From 9bc2d2981b540aa291cfecde5d33615df56a078b Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期五, 22 七月 2022 09:59:19 +0800
Subject: [PATCH] update springboot 2.7.1 => 2.7.2 update hutool 5.8.3 => 5.8.4 update okhttp 4.9.1 => 4.10.0 update lock4j 2.2.1 => 2.2.2 update aws-java-sdk-s3 1.12.248 => 1.12.264 修复依赖安全漏洞 update aliyun.sms 2.0.9 => 2.0.16 update tencent.sms 3.1.537 => 3.1.555 update guava 30.0-jre => 31.1-jre

---
 ruoyi-demo/src/main/java/com/ruoyi/demo/controller/RedisCacheController.java |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/RedisCacheController.java b/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/RedisCacheController.java
index 98cca18..2312aab 100644
--- a/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/RedisCacheController.java
+++ b/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/RedisCacheController.java
@@ -2,8 +2,6 @@
 
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.utils.redis.RedisUtils;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
 import lombok.RequiredArgsConstructor;
 import org.springframework.cache.annotation.CacheEvict;
 import org.springframework.cache.annotation.CachePut;
@@ -12,7 +10,7 @@
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.util.concurrent.TimeUnit;
+import java.time.Duration;
 
 /**
  * spring-cache 婕旂ず妗堜緥
@@ -21,7 +19,6 @@
  */
 // 绫荤骇鍒� 缂撳瓨缁熶竴閰嶇疆
 //@CacheConfig(cacheNames = "redissonCacheMap")
-@Api(value = "spring-cache 婕旂ず妗堜緥", tags = {"spring-cache 婕旂ず妗堜緥"})
 @RequiredArgsConstructor
 @RestController
 @RequestMapping("/demo/cache")
@@ -41,7 +38,6 @@
      * <p>
      * cacheNames 涓洪厤缃枃浠跺唴 groupId
      */
-    @ApiOperation("娴嬭瘯 @Cacheable")
     @Cacheable(cacheNames = "redissonCacheMap", key = "#key", condition = "#key != null")
     @GetMapping("/test1")
     public R<String> test1(String key, String value) {
@@ -56,7 +52,6 @@
      * <p>
      * cacheNames 涓� 閰嶇疆鏂囦欢鍐� groupId
      */
-    @ApiOperation("娴嬭瘯 @CachePut")
     @CachePut(cacheNames = "redissonCacheMap", key = "#key", condition = "#key != null")
     @GetMapping("/test2")
     public R<String> test2(String key, String value) {
@@ -71,7 +66,6 @@
      * <p>
      * cacheNames 涓� 閰嶇疆鏂囦欢鍐� groupId
      */
-    @ApiOperation("娴嬭瘯 @CacheEvict")
     @CacheEvict(cacheNames = "redissonCacheMap", key = "#key", condition = "#key != null")
     @GetMapping("/test3")
     public R<String> test3(String key, String value) {
@@ -83,11 +77,10 @@
      * 鎵嬪姩璁剧疆杩囨湡鏃堕棿10绉�
      * 11绉掑悗鑾峰彇 鍒ゆ柇鏄惁鐩哥瓑
      */
-    @ApiOperation("娴嬭瘯璁剧疆杩囨湡鏃堕棿")
     @GetMapping("/test6")
     public R<Boolean> test6(String key, String value) {
         RedisUtils.setCacheObject(key, value);
-        boolean flag = RedisUtils.expire(key, 10, TimeUnit.SECONDS);
+        boolean flag = RedisUtils.expire(key, Duration.ofSeconds(10));
         System.out.println("***********" + flag);
         try {
             Thread.sleep(11 * 1000);

--
Gitblit v1.9.3