[Spring X Redis] Spring Boot를 통해 간단한 REST API와 Redis를 이용한 캐시 기능을 구현
·
카테고리 없음
Java의 Redis Clinet는 Jedis, Lettuce가 있음기존엔 Jedis를 많이 썼지만 멀티 스레드의 불안정, Pool 한계 등의 단점과 Lettuce의 Netty 기반이라 비동기 지원이 가능하다는 장점 때문에 Lettuce로 추세가 넘어가고 있음 그러다 결국 Spring Boot 2.0 부터 Jedis 가 기본 클라이언트에서 deprecated 되고 Lettuce 가 탑재됨 Spring Boot 에서 Redis 를 사용하는 방법은 RedisRepository 와 RedisTemplate 두 가지가 있음. 1. spring mvc 프로젝트 생성 * 프로젝트 구조 2. application.properties 설정spring.application.name=springMVC_24_capston#..