|
@@ -1,5 +1,6 @@
|
|
|
package com.ruoyi.web.controller.monitor;
|
|
|
|
|
|
+import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.ui.ModelMap;
|
|
@@ -25,6 +26,7 @@ public class CacheController extends BaseController
|
|
|
@Autowired
|
|
|
private CacheService cacheService;
|
|
|
|
|
|
+ @RequiresPermissions("monitor:cache:view")
|
|
|
@GetMapping()
|
|
|
public String cache(ModelMap mmap)
|
|
|
{
|
|
@@ -32,6 +34,7 @@ public class CacheController extends BaseController
|
|
|
return prefix + "/cache";
|
|
|
}
|
|
|
|
|
|
+ @RequiresPermissions("monitor:cache:view")
|
|
|
@PostMapping("/getNames")
|
|
|
public String getCacheNames(String fragment, ModelMap mmap)
|
|
|
{
|
|
@@ -39,6 +42,7 @@ public class CacheController extends BaseController
|
|
|
return prefix + "/cache::" + fragment;
|
|
|
}
|
|
|
|
|
|
+ @RequiresPermissions("monitor:cache:view")
|
|
|
@PostMapping("/getKeys")
|
|
|
public String getCacheKeys(String fragment, String cacheName, ModelMap mmap)
|
|
|
{
|
|
@@ -47,6 +51,7 @@ public class CacheController extends BaseController
|
|
|
return prefix + "/cache::" + fragment;
|
|
|
}
|
|
|
|
|
|
+ @RequiresPermissions("monitor:cache:view")
|
|
|
@PostMapping("/getValue")
|
|
|
public String getCacheValue(String fragment, String cacheName, String cacheKey, ModelMap mmap)
|
|
|
{
|
|
@@ -56,6 +61,7 @@ public class CacheController extends BaseController
|
|
|
return prefix + "/cache::" + fragment;
|
|
|
}
|
|
|
|
|
|
+ @RequiresPermissions("monitor:cache:view")
|
|
|
@PostMapping("/clearCacheName")
|
|
|
@ResponseBody
|
|
|
public AjaxResult clearCacheName(String cacheName, ModelMap mmap)
|
|
@@ -64,6 +70,7 @@ public class CacheController extends BaseController
|
|
|
return AjaxResult.success();
|
|
|
}
|
|
|
|
|
|
+ @RequiresPermissions("monitor:cache:view")
|
|
|
@PostMapping("/clearCacheKey")
|
|
|
@ResponseBody
|
|
|
public AjaxResult clearCacheKey(String cacheName, String cacheKey, ModelMap mmap)
|
|
@@ -72,6 +79,7 @@ public class CacheController extends BaseController
|
|
|
return AjaxResult.success();
|
|
|
}
|
|
|
|
|
|
+ @RequiresPermissions("monitor:cache:view")
|
|
|
@GetMapping("/clearAll")
|
|
|
@ResponseBody
|
|
|
public AjaxResult clearAll(ModelMap mmap)
|