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

Merge pull request !887 from dhb52/N/A
This commit is contained in:
芋道源码 2024-03-01 01:32:08 +00:00 committed by Gitee
commit a4c7946830
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

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