| | |
| | | import org.springframework.data.redis.connection.RedisServerCommands; |
| | | import org.springframework.data.redis.core.RedisCallback; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | |
| | | |
| | | @GetMapping("/get-monitor-info") |
| | | @Operation(summary = "获得 Redis 监控信息") |
| | | @PreAuthorize("@ss.hasPermission('infra:redis:get-monitor-info')") |
| | | public CommonResult<RedisMonitorRespVO> getRedisMonitorInfo() { |
| | | // 获得 Redis 统计信息 |
| | | Properties info = stringRedisTemplate.execute((RedisCallback<Properties>) RedisServerCommands::info); |