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
@RequestMapping("/auth")
public class AuthController extends BaseController {
@Autowired
private Config config;
@RequestMapping("set")
public Result<JSONObject> set() {
String ciphertext = parmsUtil.getString("ciphertext", "请输入密文");
String data= RsaUtil.decryp(ciphertext);
config.set("common","cert",ciphertext);
return success();
}
@RequestMapping("set")
public Result<JSONObject> get() {
String cert=config.get("common","cert");
return success(JSONObject.parseObject(cert));
}
// @Autowired
// private Config config;
// @RequestMapping("set")
// public Result<JSONObject> set() {
// String ciphertext = parmsUtil.getString("ciphertext", "请输入密文");
// String data= RsaUtil.decryp(ciphertext);
// config.set("common","cert",ciphertext);
// return success();
// }
// @RequestMapping("set")
// public Result<JSONObject> get() {
// String cert=config.get("common","cert");
// return success(JSONObject.parseObject(cert));
// }
}