This commit is contained in:
ChenQiuYu 2025-04-25 14:54:37 +08:00
parent b355048d77
commit e562c9a558
1 changed files with 14 additions and 14 deletions

View File

@ -12,18 +12,18 @@ import org.springframework.web.bind.annotation.RestController;
@RestController @RestController
@RequestMapping("/auth") @RequestMapping("/auth")
public class AuthController extends BaseController { public class AuthController extends BaseController {
@Autowired // @Autowired
private Config config; // private Config config;
@RequestMapping("set") // @RequestMapping("set")
public Result<JSONObject> set() { // public Result<JSONObject> set() {
String ciphertext = parmsUtil.getString("ciphertext", "请输入密文"); // String ciphertext = parmsUtil.getString("ciphertext", "请输入密文");
String data= RsaUtil.decryp(ciphertext); // String data= RsaUtil.decryp(ciphertext);
config.set("common","cert",ciphertext); // config.set("common","cert",ciphertext);
return success(); // return success();
} // }
@RequestMapping("set") // @RequestMapping("set")
public Result<JSONObject> get() { // public Result<JSONObject> get() {
String cert=config.get("common","cert"); // String cert=config.get("common","cert");
return success(JSONObject.parseObject(cert)); // return success(JSONObject.parseObject(cert));
} // }
} }