본문 바로가기 메뉴 바로가기

ABBO 기술 블로그

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

ABBO 기술 블로그

검색하기 폼
  • 분류 전체보기 (465)
    • AI Trend (2)
    • Git (12)
    • Server (242)
    • Client (69)
    • Apple (31)
    • Study (109)
  • 방명록

ValueOperations (1)
[Spring] Redis 실제 사용해보기

이전 글에서 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
이전 1 다음
이전 다음
공지사항

Blog is powered by Tistory / Designed by Tistory

티스토리툴바