Commit 7bbab3c5 by xieshixiang

返回参数校对

parent e8c03071
......@@ -18,7 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
**/
@Slf4j
@RestController
@RequestMapping( "/tool" )
@RequestMapping("/tool")
public class ToolController {
@Autowired
SignKeyConfigBean signKeyConfigBean;
......@@ -29,8 +29,8 @@ public class ToolController {
* @param plain 明文
* @return
*/
@GetMapping( value = "encrypt" )
public String encrypt( String plain ) {
@GetMapping(value = "encrypt")
public String encrypt(String plain) {
return EncryptStringAes.encryptAes(plain, signKeyConfigBean.getKey());
}
......@@ -40,8 +40,8 @@ public class ToolController {
* @param cipher 密文
* @return
*/
@PostMapping( value = "decrypt" )
public String decrypt( String cipher ) {
@GetMapping(value = "decrypt")
public String decrypt(String cipher) {
return EncryptStringAes.decryptAes(cipher, signKeyConfigBean.getKey());
}
......@@ -50,7 +50,7 @@ public class ToolController {
*
* @return
*/
@GetMapping( value = "timestamp" )
@GetMapping(value = "timestamp")
public String timestamp() {
return String.valueOf(System.currentTimeMillis());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment