From 3706d2e1db45e64a1375b92300901de39e35e464 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期二, 25 一月 2022 21:50:54 +0800 Subject: [PATCH] update 去除链式调用注解 不符合规范导致很多奇葩问题 例如: copy为空问题 --- ruoyi-demo/src/main/java/com/ruoyi/demo/controller/RedisLockController.java | 14 ++------------ 1 files changed, 2 insertions(+), 12 deletions(-) diff --git a/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/RedisLockController.java b/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/RedisLockController.java index b2d66f5..7d30a18 100644 --- a/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/RedisLockController.java +++ b/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/RedisLockController.java @@ -9,7 +9,6 @@ import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.cache.annotation.Cacheable; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -52,8 +51,8 @@ * 娴嬭瘯lock4j 宸ュ叿 */ @ApiOperation("娴嬭瘯lock4j 宸ュ叿") - @GetMapping("/testLock4jLockTemaplate") - public AjaxResult<String> testLock4jLockTemaplate(String key, String value) { + @GetMapping("/testLock4jLockTemplate") + public AjaxResult<String> testLock4jLockTemplate(String key, String value) { final LockInfo lockInfo = lockTemplate.lock(key, 30000L, 5000L, RedissonLockExecutor.class); if (null == lockInfo) { throw new RuntimeException("涓氬姟澶勭悊涓�,璇风◢鍚庡啀璇�"); @@ -74,13 +73,4 @@ return AjaxResult.success("鎿嶄綔鎴愬姛", value); } - /** - * 娴嬭瘯spring-cache娉ㄨВ - */ - @ApiOperation("娴嬭瘯spring-cache娉ㄨВ") - @Cacheable(value = "test", key = "#key") - @GetMapping("/testCache") - public AjaxResult<String> testCache(String key) { - return AjaxResult.success("鎿嶄綔鎴愬姛", key); - } } -- Gitblit v1.9.3