Interceptor 수행 도식도 - 단일 interceptor 수행, 다중 interceptor 수행
              
          CODEDRAGON ㆍDevelopment/Spring
반응형
    
    
    
  
Interceptor 수행 도식도
· 단일 interceptor 수행
· 다중 interceptor 수행
단일 interceptor 수행
Interceptor에는 3가지 콜백 메소드가 정의되어져 있습니다.
| 단계 | 설명 | 
| 1 | 요청이 들어오면 Dispatcher servlet을 통해 Interceptor를 거치게 됩니다. 
 | 
| 2 | 처음 요청이 들어오면 Interceptor의 preHandle() 수행하게 됩니다. 
 | 
| 3 | Controller가 수행됩니다. Controller 해당 로직을 수행한 후 그 결과를 postHandle()에 전달합니다. | 
| 4 | 적절한 View통해 응답을 해주게됩니다. | 
| 5 | 응답 페이지가 출력됩니다. | 
| 6 | Response가 끝나면 afterCompletion()이 수행됩니다. | 
다중 interceptor 수행
여러 개의 Interceptor가 존재하는 경우 수행 순서
'Development > Spring' 카테고리의 다른 글
| AOP 네임스페이스 추가 하기 (0) | 2019.11.22 | 
|---|---|
| <context:component-scan> 태그, <context:include-filter> & <context:exclude-filter> (0) | 2019.11.16 | 
| pom.xml를 통해 Spring 프레임워크 설치하기 (0) | 2019.10.13 | 
| IoC 도식도 (0) | 2019.10.01 | 
| Spring Exception 특징 (0) | 2019.09.24 |