dev
This commit is contained in:
parent
b355048d77
commit
e562c9a558
|
|
@ -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));
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue