스팟 조회시 애견카페, 동물병원, 반려동물미용 3가지 키워드는 변하지않고 검색되어지는데

같은 검색어를 사용했을 땐 이전의 검색했던 값을 기억해서 API 호출 빈도를 줄이기 위해서 캐싱 처리 필요

적용중 에러!!!

Redis 사용시 Serializer/Deserializer 문제

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.data.redis.serializer.SerializationException: Could not read JSON:Cannot construct instance of com.sparta.wuzuzu.domain.spot.dto.response.SpotAddressResponseKaKao (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)

JsonCreator를 통해 ObjectMapper가 타입 추론은 할 수 있게 됐는데 reponseDto 를 모르는것

dto 에 @NoArgsConstructor 붙여서 해결

스크린샷 2024-04-03 19.38.02.jpg

Untitled

Untitled

dependencies {
	implementation("org.springframework.boot:spring-boot-starter-data-redis")
}