Spring Boot (2) 썸네일형 리스트형 [webflux] 이미지 조회 Cache 처리 스프링 부트에서 webclient 를 통해 외부의 이미지를 조회하는 서비스를 제공한다. 로컬에서 테스트시 1 request 에 대해서 평균 100ms 이 걸리며 webflux 로 개발되어 있다. mvc에서 사용되는 @Cacheable 은 mono, flux에 지원되지 않기에 사용에 맞게 개발이 필요한 상황이다. build.gradle ... ext { swaggerVersion = "2.10.5" commonsIoVersion = "2.7" gsonVersion = "2.8.6" jwtVersion = "0.9.1" reactExtraVersion = "3.3.3.RELEASE" caffeineVersion = "2.8.5" } dependencies { // spring boot implementati.. [webflux] Global Exception 스프링 부트에서 공통 에러를 처리할는 것은 MVC 와 조금 다르다. 사용자 에러처리를 하든지 또는 스프링 부트 자체의 에러를 공통으로 처리하는 방법은 아래와 같다. GlobalException import org.springframework.http.HttpStatus; import org.springframework.web.server.ResponseStatusException; public class GlobalException extends ResponseStatusException { private static final long serialVersionUID = -1L; public GlobalException(HttpStatus status) { super(status); } public Gl.. 이전 1 다음