C - The object that is returned or Chained after creating the RequestMatcherpublic abstract class AbstractRequestMatcherRegistry<C> extends Object
RequestMatcher's. For example, it might allow for
specifying which RequestMatcher require a certain level of authorization.| Constructor and Description |
|---|
AbstractRequestMatcherRegistry() |
| Modifier and Type | Method and Description |
|---|---|
C |
antMatchers(HttpMethod method)
Maps a
List of
AntPathRequestMatcher
instances. |
C |
antMatchers(HttpMethod method,
String... antPatterns)
Maps a
List of
AntPathRequestMatcher
instances. |
C |
antMatchers(String... antPatterns)
|
C |
anyRequest()
Maps any request.
|
protected abstract C |
chainRequestMatchers(List<RequestMatcher> requestMatchers)
Subclasses should implement this method for returning the object that is chained to
the creation of the
RequestMatcher instances. |
C |
mvcMatchers(HttpMethod method,
String... mvcPatterns)
Maps an
MvcRequestMatcher that also specifies a specific HttpMethod
to match on. |
C |
mvcMatchers(String... mvcPatterns)
Maps an
MvcRequestMatcher that does not care which HttpMethod is
used. |
C |
regexMatchers(HttpMethod method,
String... regexPatterns)
Maps a
List of
RegexRequestMatcher
instances. |
C |
regexMatchers(String... regexPatterns)
|
C |
requestMatchers(RequestMatcher... requestMatchers)
Associates a list of
RequestMatcher instances with the
AbstractConfigAttributeRequestMatcherRegistry |
protected void |
setApplicationContext(ApplicationContext context) |
protected final void setApplicationContext(ApplicationContext context)
public C anyRequest()
RequestMatcherpublic C antMatchers(HttpMethod method)
List of
AntPathRequestMatcher
instances.method - the HttpMethod to use for any
HttpMethod.RequestMatcherpublic C antMatchers(HttpMethod method, String... antPatterns)
List of
AntPathRequestMatcher
instances.method - the HttpMethod to use or null for any
HttpMethod.antPatterns - the ant patterns to create. If null or empty, then matches on nothing.
AntPathRequestMatcher fromRequestMatcherpublic C antMatchers(String... antPatterns)
antPatterns - the ant patterns to create
AntPathRequestMatcher fromRequestMatcherpublic C mvcMatchers(String... mvcPatterns)
Maps an MvcRequestMatcher that does not care which HttpMethod is
used. This matcher will use the same rules that Spring MVC uses for matching. For
example, often times a mapping of the path "/path" will match on "/path", "/path/",
"/path.html", etc.
If the current request will not be processed by Spring MVC, a reasonable default using the pattern as a ant pattern will be used.
mvcPatterns - the patterns to match on. The rules for matching are defined by
Spring MVCRequestMatcher.public C mvcMatchers(HttpMethod method, String... mvcPatterns)
Maps an MvcRequestMatcher that also specifies a specific HttpMethod
to match on. This matcher will use the same rules that Spring MVC uses for
matching. For example, often times a mapping of the path "/path" will match on
"/path", "/path/", "/path.html", etc.
If the current request will not be processed by Spring MVC, a reasonable default using the pattern as a ant pattern will be used.
method - the HTTP method to match onmvcPatterns - the patterns to match on. The rules for matching are defined by
Spring MVCRequestMatcher.public C regexMatchers(HttpMethod method, String... regexPatterns)
List of
RegexRequestMatcher
instances.method - the HttpMethod to use or null for any
HttpMethod.regexPatterns - the regular expressions to create
RegexRequestMatcher fromRequestMatcherpublic C regexMatchers(String... regexPatterns)
regexPatterns - the regular expressions to create
RegexRequestMatcher fromRequestMatcherpublic C requestMatchers(RequestMatcher... requestMatchers)
RequestMatcher instances with the
AbstractConfigAttributeRequestMatcherRegistryrequestMatchers - the RequestMatcher instancesRequestMatcherprotected abstract C chainRequestMatchers(List<RequestMatcher> requestMatchers)
RequestMatcher instances.requestMatchers - the RequestMatcher instances that were createdRequestMatcher