From 9ea8edde96272e14b0deacb81996a65c4fcb5285 Mon Sep 17 00:00:00 2001 From: lige <bestlige@outlook.com> Date: 星期三, 13 九月 2023 16:49:18 +0800 Subject: [PATCH] 修改接口权限 --- ltkj-admin/src/main/java/com/ltkj/web/controller/system/CacheController.java | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/CacheController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/CacheController.java index 0728784..b057fe7 100644 --- a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/CacheController.java +++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/CacheController.java @@ -45,7 +45,7 @@ caches.add(new SysCache(CacheConstants.PWD_ERR_CNT_KEY, "瀵嗙爜閿欒娆℃暟")); } - @PreAuthorize("@ss.hasPermi('monitor:cache:list')") + //@PreAuthorize("@ss.hasPermi('monitor:cache:list')") @GetMapping() public AjaxResult getInfo() throws Exception { Properties info = (Properties) redisTemplate.execute((RedisCallback<Object>) connection -> connection.info()); @@ -68,20 +68,20 @@ return AjaxResult.success(result); } - @PreAuthorize("@ss.hasPermi('monitor:cache:list')") + //@PreAuthorize("@ss.hasPermi('monitor:cache:list')") @GetMapping("/getNames") public AjaxResult cache() { return AjaxResult.success(caches); } - @PreAuthorize("@ss.hasPermi('monitor:cache:list')") + //@PreAuthorize("@ss.hasPermi('monitor:cache:list')") @GetMapping("/getKeys/{cacheName}") public AjaxResult getCacheKeys(@PathVariable String cacheName) { Set<String> cacheKeys = redisTemplate.keys(cacheName + "*"); return AjaxResult.success(cacheKeys); } - @PreAuthorize("@ss.hasPermi('monitor:cache:list')") + //@PreAuthorize("@ss.hasPermi('monitor:cache:list')") @GetMapping("/getValue/{cacheName}/{cacheKey}") public AjaxResult getCacheValue(@PathVariable String cacheName, @PathVariable String cacheKey) { String cacheValue = redisTemplate.opsForValue().get(cacheKey); @@ -89,7 +89,7 @@ return AjaxResult.success(sysCache); } - @PreAuthorize("@ss.hasPermi('monitor:cache:list')") + //@PreAuthorize("@ss.hasPermi('monitor:cache:list')") @DeleteMapping("/clearCacheName/{cacheName}") public AjaxResult clearCacheName(@PathVariable String cacheName) { Collection<String> cacheKeys = redisTemplate.keys(cacheName + "*"); @@ -97,14 +97,14 @@ return AjaxResult.success(); } - @PreAuthorize("@ss.hasPermi('monitor:cache:list')") + //@PreAuthorize("@ss.hasPermi('monitor:cache:list')") @DeleteMapping("/clearCacheKey/{cacheKey}") public AjaxResult clearCacheKey(@PathVariable String cacheKey) { redisTemplate.delete(cacheKey); return AjaxResult.success(); } - @PreAuthorize("@ss.hasPermi('monitor:cache:list')") + //@PreAuthorize("@ss.hasPermi('monitor:cache:list')") @DeleteMapping("/clearCacheAll") public AjaxResult clearCacheAll() { Collection<String> cacheKeys = redisTemplate.keys("*"); -- Gitblit v1.8.0