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

This commit is contained in:
YunaiV 2024-03-01 09:39:27 +08:00
parent 8a93a4d988
commit d8bfed5c87

View File

@ -34,7 +34,7 @@ public class RedisController {
Properties info = stringRedisTemplate.execute((RedisCallback<Properties>) RedisServerCommands::info);
Long dbSize = stringRedisTemplate.execute(RedisServerCommands::dbSize);
Properties commandStats = stringRedisTemplate.execute((
RedisCallback<Properties>) connection -> connection.info("commandstats"));
RedisCallback<Properties>) connection -> connection.serverCommands().info("commandstats"));
assert commandStats != null; // 断言避免警告
// 拼接结果返回
return success(RedisConvert.INSTANCE.build(info, dbSize, commandStats));