Commit d8bfed5c87e9bc1affc4c82d1144e27018ab8377
1 parent
8a93a4d9
fix: 获取redis命令统计指令有误
Showing
1 changed file
with
1 additions
and
1 deletions
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 | 34 | Properties info = stringRedisTemplate.execute((RedisCallback<Properties>) RedisServerCommands::info); |
| 35 | 35 | Long dbSize = stringRedisTemplate.execute(RedisServerCommands::dbSize); |
| 36 | 36 | Properties commandStats = stringRedisTemplate.execute(( |
| 37 | - RedisCallback<Properties>) connection -> connection.info("commandstats")); | |
| 37 | + RedisCallback<Properties>) connection -> connection.serverCommands().info("commandstats")); | |
| 38 | 38 | assert commandStats != null; // 断言,避免警告 |
| 39 | 39 | // 拼接结果返回 |
| 40 | 40 | return success(RedisConvert.INSTANCE.build(info, dbSize, commandStats)); | ... | ... |