filter
-
CS 100문 100답 Q.006~008(filter, interceptor, AOP)카테고리 없음 2022. 8. 22. 13:15
키워드 풀이 Interceptor와 Filter는 Servlet 단위에서 실행되며 AOP는 메소드 앞에서 Proxy패턴의 형태로 실행. 요청이 들어오면 Filter => Interceptor => AOP => Interceptor => Filter 순으로 진행. 서버를 실행시켜 서블릿이 올라오는 동안에 init이 실행되고, 그 후 doFilter가 실행 컨트롤러에 들어가기 전 preHandler가 실행 컨트롤러에서 나와 postHandler, after Completion, doFilter 순으로 진행 서블릿 종료 시 destroy가 실행 006. Filter 란 무엇인가? 요청과 응답을 거른뒤 정제하는 역할. 서블릿 필터는 DispatcherServlet 이전에 실행되며 필터가 동작하도록 지정된 자원의..