|
@@ -2,6 +2,7 @@ package com.jjt.web.controller.monitor;
|
|
|
|
|
|
import com.jjt.common.constant.CacheConstants;
|
|
|
import com.jjt.common.core.domain.AjaxResult;
|
|
|
+import com.jjt.common.core.text.Convert;
|
|
|
import com.jjt.common.utils.StringUtils;
|
|
|
import com.jjt.system.domain.SysCache;
|
|
|
import org.springframework.data.redis.core.RedisCallback;
|
|
@@ -33,6 +34,7 @@ public class CacheController {
|
|
|
caches.add(new SysCache(CacheConstants.REPEAT_SUBMIT_KEY, "防重提交"));
|
|
|
caches.add(new SysCache(CacheConstants.RATE_LIMIT_KEY, "限流处理"));
|
|
|
caches.add(new SysCache(CacheConstants.PWD_ERR_CNT_KEY, "密码错误次数"));
|
|
|
+ caches.add(new SysCache(CacheConstants.TWIN, "数据消费"));
|
|
|
}
|
|
|
|
|
|
@PreAuthorize("@ss.hasPermi('monitor:cache:list')")
|
|
@@ -74,7 +76,7 @@ public class CacheController {
|
|
|
@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);
|
|
|
+ String cacheValue = Convert.toStr(redisTemplate.opsForValue().get(cacheKey));
|
|
|
SysCache sysCache = new SysCache(cacheName, cacheKey, cacheValue);
|
|
|
return AjaxResult.success(sysCache);
|
|
|
}
|