疯狂的狮子li
2021-06-16 f9967cca4ca696860986ccd3497bc5687b3544ba
ruoyi-demo/src/main/java/com/ruoyi/demo/controller/RedisLockController.java
@@ -5,6 +5,7 @@
import com.ruoyi.common.core.redis.RedisLockManager;
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;
@@ -62,4 +63,13 @@
      }
      return AjaxResult.success();
   }
   /**
    * 测试spring-cache注解
    */
   @Cacheable(value = "test", key = "#key")
   @GetMapping("/testCache")
   public AjaxResult<String> testCache(String key) {
      return AjaxResult.success("操作成功", key);
   }
}