728x90
프로젝트
-
Board - Interceptor, AOP, TransactionProjects/Problem & Solution 2021. 11. 6. 19:50
Interceptor 적용 인터셉터(Intterceptor)란? 인터셉터는 컨트롤러의 URI에 접근하는 과정에서 무언가를 제어할 필요가 있을 때 사용된다. 예를 들어, 회원제로 이루어지는 시스템이 있다고 가정했을 때, 로그인이나 계정의 권한과 관련된 처리 등을 인터셉터를 이용해서 더욱 효율적으로 처리가 가능하다. 1. LoggerInterceptor 클래스 생성 @Slf4j public class LoggerInterceptor implements HandlerInterceptor { @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exceptio..