public final class MappedInterceptor extends Object
Constructor and Description |
---|
MappedInterceptor(String[] includePatterns,
HandlerInterceptor interceptor)
Create a new MappedInterceptor instance.
|
MappedInterceptor(String[] includePatterns,
String[] excludePatterns,
HandlerInterceptor interceptor)
Create a new MappedInterceptor instance.
|
MappedInterceptor(String[] includePatterns,
String[] excludePatterns,
org.springframework.web.context.request.WebRequestInterceptor interceptor)
Create a new MappedInterceptor instance.
|
MappedInterceptor(String[] includePatterns,
org.springframework.web.context.request.WebRequestInterceptor interceptor)
Create a new MappedInterceptor instance.
|
Modifier and Type | Method and Description |
---|---|
HandlerInterceptor |
getInterceptor()
The actual Interceptor reference.
|
org.springframework.util.PathMatcher |
getPathMatcher()
The configured PathMatcher, or
null . |
String[] |
getPathPatterns()
The path into the application the interceptor is mapped to.
|
boolean |
matches(String lookupPath,
org.springframework.util.PathMatcher pathMatcher)
Returns
true if the interceptor applies to the given request path. |
void |
setPathMatcher(org.springframework.util.PathMatcher pathMatcher)
Configure a PathMatcher to use with this MappedInterceptor instead of the
one passed by default to the
matches(String, org.springframework.util.PathMatcher)
method. |
public MappedInterceptor(String[] includePatterns, HandlerInterceptor interceptor)
includePatterns
- the path patterns to map with a null
value matching to all pathsinterceptor
- the HandlerInterceptor instance to map to the given patternspublic MappedInterceptor(String[] includePatterns, String[] excludePatterns, HandlerInterceptor interceptor)
includePatterns
- the path patterns to map with a null
value matching to all pathsexcludePatterns
- the path patterns to excludeinterceptor
- the HandlerInterceptor instance to map to the given patternspublic MappedInterceptor(String[] includePatterns, org.springframework.web.context.request.WebRequestInterceptor interceptor)
includePatterns
- the path patterns to map with a null
value matching to all pathsinterceptor
- the WebRequestInterceptor instance to map to the given patternspublic MappedInterceptor(String[] includePatterns, String[] excludePatterns, org.springframework.web.context.request.WebRequestInterceptor interceptor)
includePatterns
- the path patterns to map with a null
value matching to all pathsinterceptor
- the WebRequestInterceptor instance to map to the given patternspublic void setPathMatcher(org.springframework.util.PathMatcher pathMatcher)
matches(String, org.springframework.util.PathMatcher)
method. This is an advanced property that is only required when using custom
PathMatcher implementations that support mapping metadata other than the
Ant-style path patterns supported by default.pathMatcher
- the path matcher to usepublic org.springframework.util.PathMatcher getPathMatcher()
null
.public String[] getPathPatterns()
public HandlerInterceptor getInterceptor()
public boolean matches(String lookupPath, org.springframework.util.PathMatcher pathMatcher)
true
if the interceptor applies to the given request path.lookupPath
- the current request pathpathMatcher
- a path matcher for path pattern matching