[Spring] ControllerAdvice는 AOP로 구현되어 있을까? ControllerAdvice의 동작 과정 살펴보기
이번에는 ControllerAdvice의 동작 과정이 어떻게 되는지 코드로 직접 살펴보도록 하겠습니다. 1. ControllerAdvice의 동작 과정 살펴보기 [ ControllerAdvice의 동작 과정 ] 디스패처 서블릿이 에러를 catch함 해당 에러를 처리할 수 있는 처리기(HandlerExceptionResolver)가 에러를 처리함 컨트롤러의 ExceptionHandler로 처리가능한지 검사함 ControllerAdvice의 ExceptionHandler로 처리가능한지 검사함 ControllerAdvice의 ExceptionHandler 메소드를 invoke하여 예외를 반환함 1. 디스패처 서블릿이 에러를 catch함 스프링에서 모든 요청을 가장 먼저 받는 곳은 디스패처 서블릿이다. 그러다보..
Spring
2022. 4. 28. 10:10