Class InterceptorRegistry
- java.lang.Object
- org.springframework.web.servlet.config.annotation.InterceptorRegistry
public class InterceptorRegistry extends Object
Helps with configuring a list of mapped interceptors.- Since:
- 3.1
- Author:
- Rossen Stoyanchev, Keith Donald
Constructor Summary
Constructors Constructor Description InterceptorRegistry()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InterceptorRegistration
addInterceptor(HandlerInterceptor interceptor)
Adds the providedHandlerInterceptor
.InterceptorRegistration
addWebRequestInterceptor(WebRequestInterceptor interceptor)
Adds the providedWebRequestInterceptor
.protected List<Object>
getInterceptors()
Return all registered interceptors.
Constructor Detail
InterceptorRegistry
public InterceptorRegistry()
Method Detail
addInterceptor
public InterceptorRegistration addInterceptor(HandlerInterceptor interceptor)
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
public InterceptorRegistration addWebRequestInterceptor(WebRequestInterceptor interceptor)
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
protected List<Object> getInterceptors()
Return all registered interceptors.