Commit d8bfed5c87e9bc1affc4c82d1144e27018ab8377

Authored by YunaiV
1 parent 8a93a4d9

fix: 获取redis命令统计指令有误

yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/redis/RedisController.java
@@ -34,7 +34,7 @@ public class RedisController { @@ -34,7 +34,7 @@ public class RedisController {
34 Properties info = stringRedisTemplate.execute((RedisCallback<Properties>) RedisServerCommands::info); 34 Properties info = stringRedisTemplate.execute((RedisCallback<Properties>) RedisServerCommands::info);
35 Long dbSize = stringRedisTemplate.execute(RedisServerCommands::dbSize); 35 Long dbSize = stringRedisTemplate.execute(RedisServerCommands::dbSize);
36 Properties commandStats = stringRedisTemplate.execute(( 36 Properties commandStats = stringRedisTemplate.execute((
37 - RedisCallback<Properties>) connection -> connection.info("commandstats")); 37 + RedisCallback<Properties>) connection -> connection.serverCommands().info("commandstats"));
38 assert commandStats != null; // 断言,避免警告 38 assert commandStats != null; // 断言,避免警告
39 // 拼接结果返回 39 // 拼接结果返回
40 return success(RedisConvert.INSTANCE.build(info, dbSize, commandStats)); 40 return success(RedisConvert.INSTANCE.build(info, dbSize, commandStats));