Class InterceptorRegistry
java.lang.Object
org.springframework.web.servlet.config.annotation.InterceptorRegistry
Helps with configuring a list of mapped interceptors.
- Since:
- 3.1
- Author:
- Rossen Stoyanchev, Keith Donald
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddInterceptor
(HandlerInterceptor interceptor) Adds the providedHandlerInterceptor
.addWebRequestInterceptor
(WebRequestInterceptor interceptor) Adds the providedWebRequestInterceptor
.Return all registered interceptors.
-
Constructor Details
-
InterceptorRegistry
public InterceptorRegistry()
-
-
Method Details
-
addInterceptor
Adds the providedHandlerInterceptor
.- Parameters:
interceptor
- the interceptor to add- Returns:
- an
InterceptorRegistration
that allows you optionally configure the registered interceptor further for example adding URL patterns it should apply to.
-
addWebRequestInterceptor
Adds the providedWebRequestInterceptor
.- Parameters:
interceptor
- the interceptor to add- Returns:
- an
InterceptorRegistration
that allows you optionally configure the registered interceptor further for example adding URL patterns it should apply to.
-
getInterceptors
Return all registered interceptors.
-