public class InterceptorRegistration extends Object
MappedInterceptor
.Constructor and Description |
---|
InterceptorRegistration(HandlerInterceptor interceptor)
Create an
InterceptorRegistration instance. |
Modifier and Type | Method and Description |
---|---|
InterceptorRegistration |
addPathPatterns(List<String> patterns)
List-based variant of
addPathPatterns(String...) . |
InterceptorRegistration |
addPathPatterns(String... patterns)
Add patterns for URLs the interceptor should be included in.
|
InterceptorRegistration |
excludePathPatterns(List<String> patterns)
List-based variant of
excludePathPatterns(String...) . |
InterceptorRegistration |
excludePathPatterns(String... patterns)
Add patterns for URLs the interceptor should be excluded from.
|
protected Object |
getInterceptor()
Build the underlying interceptor.
|
protected int |
getOrder()
Return the order position to be used.
|
InterceptorRegistration |
order(int order)
Specify an order position to be used.
|
InterceptorRegistration |
pathMatcher(PathMatcher pathMatcher)
Configure the PathMatcher to use to match URL paths with against include
and exclude patterns.
|
public InterceptorRegistration(HandlerInterceptor interceptor)
InterceptorRegistration
instance.public InterceptorRegistration addPathPatterns(String... patterns)
For pattern syntax see PathPattern
when parsed patterns
are enabled
or
AntPathMatcher
otherwise. The syntax is largely the same with
PathPattern
more tailored for web usage and more efficient.
public InterceptorRegistration addPathPatterns(List<String> patterns)
addPathPatterns(String...)
.public InterceptorRegistration excludePathPatterns(String... patterns)
For pattern syntax see PathPattern
when parsed patterns
are enabled
or
AntPathMatcher
otherwise. The syntax is largely the same with
PathPattern
more tailored for web usage and more efficient.
public InterceptorRegistration excludePathPatterns(List<String> patterns)
excludePathPatterns(String...)
.public InterceptorRegistration pathMatcher(PathMatcher pathMatcher)
This is an advanced property that should be used only when a
customized AntPathMatcher
or a custom PathMatcher is required.
By default this is AntPathMatcher
.
Note: Setting PathMatcher
enforces use of
String pattern matching even when a
parsed
RequestPath
is available.
public InterceptorRegistration order(int order)
protected int getOrder()
protected Object getInterceptor()
MappedInterceptor
; otherwise HandlerInterceptor
.