
이전 글에서 Redis Connection 과 Configuration 을 진행하였다면 다음으로는 Redis 실제로 사용하는 코드를 작성해볼까 합니다. 이번에는 서버의 헬스 체크를 하는 모듈을 작성해보았어요. @Component public class RedisComponent { @Resource(name = "redisTemplate") private ValueOperations valueOperations; private String checkedSuffix = "-checked"; public boolean isServerDown(String serverName) { final String value = valueOperations.get(serverName); if(value == null) {..
Server
2022. 12. 16. 22:09
공지사항