Class HttpSecurity.RequestMatcherConfigurer
- java.lang.Object
-
- org.springframework.security.config.annotation.web.AbstractRequestMatcherRegistry<HttpSecurity.RequestMatcherConfigurer>
-
- org.springframework.security.config.annotation.web.builders.HttpSecurity.RequestMatcherConfigurer
-
- Direct Known Subclasses:
HttpSecurity.MvcMatchersRequestMatcherConfigurer
- Enclosing class:
- HttpSecurity
public class HttpSecurity.RequestMatcherConfigurer extends AbstractRequestMatcherRegistry<HttpSecurity.RequestMatcherConfigurer>
Allows mapping HTTP requests that thisHttpSecurity
will be used for- Since:
- 3.2
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<org.springframework.security.web.util.matcher.RequestMatcher>
matchers
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpSecurity
and()
Return theHttpSecurity
for further customizationsprotected HttpSecurity.RequestMatcherConfigurer
chainRequestMatchers(java.util.List<org.springframework.security.web.util.matcher.RequestMatcher> requestMatchers)
Subclasses should implement this method for returning the object that is chained to the creation of theRequestMatcher
instances.HttpSecurity.MvcMatchersRequestMatcherConfigurer
mvcMatchers(java.lang.String... patterns)
Maps anMvcRequestMatcher
that does not care whichHttpMethod
is used.HttpSecurity.MvcMatchersRequestMatcherConfigurer
mvcMatchers(org.springframework.http.HttpMethod method, java.lang.String... mvcPatterns)
Maps anMvcRequestMatcher
that also specifies a specificHttpMethod
to match on.-
Methods inherited from class org.springframework.security.config.annotation.web.AbstractRequestMatcherRegistry
antMatchers, antMatchers, antMatchers, anyRequest, createMvcMatchers, dispatcherTypeMatchers, dispatcherTypeMatchers, getApplicationContext, regexMatchers, regexMatchers, requestMatchers, setApplicationContext
-
-
-
-
Method Detail
-
mvcMatchers
public HttpSecurity.MvcMatchersRequestMatcherConfigurer mvcMatchers(org.springframework.http.HttpMethod method, java.lang.String... mvcPatterns)
Description copied from class:AbstractRequestMatcherRegistry
Maps an
MvcRequestMatcher
that also specifies a specificHttpMethod
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.
- Specified by:
mvcMatchers
in classAbstractRequestMatcherRegistry<HttpSecurity.RequestMatcherConfigurer>
- Parameters:
method
- the HTTP method to match onmvcPatterns
- the patterns to match on. The rules for matching are defined by Spring MVC- Returns:
- the object that is chained after creating the
RequestMatcher
.
-
mvcMatchers
public HttpSecurity.MvcMatchersRequestMatcherConfigurer mvcMatchers(java.lang.String... patterns)
Description copied from class:AbstractRequestMatcherRegistry
Maps an
MvcRequestMatcher
that does not care whichHttpMethod
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.
- Specified by:
mvcMatchers
in classAbstractRequestMatcherRegistry<HttpSecurity.RequestMatcherConfigurer>
- Parameters:
patterns
- the patterns to match on. The rules for matching are defined by Spring MVC- Returns:
- the object that is chained after creating the
RequestMatcher
.
-
chainRequestMatchers
protected HttpSecurity.RequestMatcherConfigurer chainRequestMatchers(java.util.List<org.springframework.security.web.util.matcher.RequestMatcher> requestMatchers)
Description copied from class:AbstractRequestMatcherRegistry
Subclasses should implement this method for returning the object that is chained to the creation of theRequestMatcher
instances.- Specified by:
chainRequestMatchers
in classAbstractRequestMatcherRegistry<HttpSecurity.RequestMatcherConfigurer>
- Parameters:
requestMatchers
- theRequestMatcher
instances that were created- Returns:
- the chained Object for the subclass which allows association of something
else to the
RequestMatcher
-
and
public HttpSecurity and()
Return theHttpSecurity
for further customizations- Returns:
- the
HttpSecurity
for further customizations
-
-