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,
WebRequestInterceptor interceptor)
Create a new MappedInterceptor instance.
|
MappedInterceptor(String[] includePatterns,
WebRequestInterceptor interceptor)
Create a new MappedInterceptor instance.
|
Modifier and Type | Method and Description |
---|---|
HandlerInterceptor |
getInterceptor()
The actual Interceptor reference.
|
PathMatcher |
getPathMatcher()
The configured PathMatcher, or
null . |
String[] |
getPathPatterns()
The path into the application the interceptor is mapped to.
|
boolean |
matches(String lookupPath,
PathMatcher pathMatcher)
Returns
true if the interceptor applies to the given request path. |
void |
setPathMatcher(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, 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, 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(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 PathMatcher getPathMatcher()
null
.public String[] getPathPatterns()
public HandlerInterceptor getInterceptor()
public boolean matches(String lookupPath, PathMatcher pathMatcher)
true
if the interceptor applies to the given request path.lookupPath
- the current request pathpathMatcher
- a path matcher for path pattern matching