Class AbstractRequestMatcherRegistry<C>
- Type Parameters:
- C- The object that is returned or Chained after creating the RequestMatcher
- Direct Known Subclasses:
- AbstractConfigAttributeRequestMatcherRegistry,- AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry,- HttpSecurity.RequestMatcherConfigurer,- WebSecurity.IgnoredRequestConfigurer
RequestMatcher's. For example, it might allow for
 specifying which RequestMatcher require a certain level of authorization.- Since:
- 3.2
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionMaps any request.protected abstract CchainRequestMatchers(List<RequestMatcher> requestMatchers) Subclasses should implement this method for returning the object that is chained to the creation of theRequestMatcherinstances.protected final List<MvcRequestMatcher>createMvcMatchers(org.springframework.http.HttpMethod method, String... mvcPatterns) CreatesMvcRequestMatcherinstances for the method and patterns passed indispatcherTypeMatchers(jakarta.servlet.DispatcherType... dispatcherTypes) dispatcherTypeMatchers(org.springframework.http.HttpMethod method, jakarta.servlet.DispatcherType... dispatcherTypes) Maps aListofDispatcherTypeRequestMatcherinstances.protected final org.springframework.context.ApplicationContextGets theApplicationContextrequestMatchers(String... patterns) If theHandlerMappingIntrospectoris available in the classpath, maps to anMvcRequestMatcherthat does not care whichHttpMethodis used.requestMatchers(org.springframework.http.HttpMethod method) If theHandlerMappingIntrospectoris available in the classpath, maps to anMvcRequestMatcherthat matches on a specificHttpMethod.requestMatchers(org.springframework.http.HttpMethod method, String... patterns) If theHandlerMappingIntrospectoris available in the classpath, maps to anMvcRequestMatcherthat also specifies a specificHttpMethodto match on.requestMatchers(RequestMatcher... requestMatchers) Associates a list ofRequestMatcherinstances with theAbstractRequestMatcherRegistryprotected final voidsetApplicationContext(org.springframework.context.ApplicationContext context) 
- 
Constructor Details- 
AbstractRequestMatcherRegistrypublic AbstractRequestMatcherRegistry()
 
- 
- 
Method Details- 
setApplicationContextprotected final void setApplicationContext(org.springframework.context.ApplicationContext context) 
- 
getApplicationContextprotected final org.springframework.context.ApplicationContext getApplicationContext()Gets theApplicationContext- Returns:
- the ApplicationContext
 
- 
anyRequestMaps any request.- Returns:
- the object that is chained after creating the RequestMatcher
 
- 
createMvcMatchersprotected final List<MvcRequestMatcher> createMvcMatchers(org.springframework.http.HttpMethod method, String... mvcPatterns) CreatesMvcRequestMatcherinstances for the method and patterns passed in- Parameters:
- method- the HTTP method to use or null if any should be used
- mvcPatterns- the Spring MVC patterns to match on
- Returns:
- a List of MvcRequestMatcherinstances
 
- 
dispatcherTypeMatcherspublic C dispatcherTypeMatchers(@Nullable org.springframework.http.HttpMethod method, jakarta.servlet.DispatcherType... dispatcherTypes) Maps aListofDispatcherTypeRequestMatcherinstances.- Parameters:
- method- the- HttpMethodto use or- nullfor any- HttpMethod.
- dispatcherTypes- the dispatcher types to match against
- Returns:
- the object that is chained after creating the RequestMatcher
 
- 
dispatcherTypeMatchers- Parameters:
- dispatcherTypes- the dispatcher types to match against
- Returns:
- the object that is chained after creating the RequestMatcher
 
- 
requestMatchersAssociates a list ofRequestMatcherinstances with theAbstractRequestMatcherRegistry- Parameters:
- requestMatchers- the- RequestMatcherinstances
- Returns:
- the object that is chained after creating the RequestMatcher
 
- 
requestMatchersIf the HandlerMappingIntrospectoris available in the classpath, maps to anMvcRequestMatcherthat also specifies a specificHttpMethodto 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 theHandlerMappingIntrospectoris not available, maps to anAntPathRequestMatcher.If a specific RequestMatchermust be specified, userequestMatchers(RequestMatcher...)instead- Parameters:
- method- the- HttpMethodto use or- nullfor any- HttpMethod.
- patterns- the patterns to match on. The rules for matching are defined by Spring MVC if- MvcRequestMatcheris used
- Returns:
- the object that is chained after creating the RequestMatcher.
- Since:
- 5.8
 
- 
requestMatchersIf the HandlerMappingIntrospectoris available in the classpath, maps to anMvcRequestMatcherthat does not care whichHttpMethodis 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 theHandlerMappingIntrospectoris not available, maps to anAntPathRequestMatcher.If a specific RequestMatchermust be specified, userequestMatchers(RequestMatcher...)instead- Parameters:
- patterns- the patterns to match on. The rules for matching are defined by Spring MVC if- MvcRequestMatcheris used
- Returns:
- the object that is chained after creating the RequestMatcher.
- Since:
- 5.8
 
- 
requestMatchersIf the HandlerMappingIntrospectoris available in the classpath, maps to anMvcRequestMatcherthat matches on a specificHttpMethod. 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 theHandlerMappingIntrospectoris not available, maps to anAntPathRequestMatcher.If a specific RequestMatchermust be specified, userequestMatchers(RequestMatcher...)instead- Parameters:
- method- the- HttpMethodto use or- nullfor any- HttpMethod.
- Returns:
- the object that is chained after creating the RequestMatcher.
- Since:
- 5.8
 
- 
chainRequestMatchersSubclasses should implement this method for returning the object that is chained to the creation of theRequestMatcherinstances.- Parameters:
- requestMatchers- the- RequestMatcherinstances that were created
- Returns:
- the chained Object for the subclass which allows association of something
 else to the RequestMatcher
 
 
-