Spring2 [Spring] MVC HandlerInterceptor / Interceptor를 사용하여 HTTP 요청을 가로채는 방법 Spring Handler Interceptor Simply put, a Spring interceptor is a class that either extends the HandlerInterceptorAdapter class or implements the HandlerInterceptor interface. public class LoggerInterceptor implements HandlerInterceptor { ... } Spring Interceptor는 ①HandlerInterceptor 인터페이스를 구현 하거나, ②HandlerInterceptorAdapter 클래스를 상속 하는 클래스다. ①HandlerInterceptor 인터페이스를 구현 HandlerInterceptor 에는 3가지.. 2023. 6. 19. [Spring] com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class 오류 해결 오류 com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class com.example.dto.ResponseCodeDto and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: java.util.HashMap["responseCodeDto"]) 해결 // 생략... responseMap.put("body", new Gson().toJson(responseCodeDto)); // return return r.. 2023. 2. 28. 이전 1 다음