Replies: 1 comment
-
스프링에서 여러 개의 인터셉터(Interceptor)가 동일한 매핑(mapping)에 등록되었을 때, 그 인터셉터들은 등록된 순서대로 실행됩니다.
@Configuration
public class WebConfig implements WebMvcConfigurer {
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(new AInterceptor()).addPathPatterns("/example/**");
registry.addInterceptor(new BInterceptor()).addPathPatterns("/example/**");
registry.addInterceptor(new CInterceptor()).addPathPatterns("/example/**");
}
} 위와 같은 경우,
그 이후 컨트롤러가 실행되면:
그리고 마지막으로:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
.
Beta Was this translation helpful? Give feedback.
All reactions