类 ApplicationContextRequestMatcher<C>
java.lang.Object
org.springframework.boot.security.servlet.ApplicationContextRequestMatcher<C>
- 类型参数:
C- the type of the context that the match method actually needs to use. Can be anApplicationContextor a class of anexisting bean.
- 所有已实现的接口:
RequestMatcher
- 直接已知子类:
EndpointRequest.AdditionalPathsEndpointRequestMatcher,EndpointRequest.EndpointRequestMatcher,EndpointRequest.LinksRequestMatcher,PathRequest.H2ConsoleRequestMatcher,StaticResourceRequest.StaticResourceRequestMatcher
ApplicationContext backed RequestMatcher. Can work directly with the
ApplicationContext, obtain an existing bean or
create a new bean that is
autowired in the usual way.- 从以下版本开始:
- 2.0.0
- 作者:
- Phillip Webb
-
嵌套类概要
从接口继承的嵌套类/接口 org.springframework.security.web.util.matcher.RequestMatcher
RequestMatcher.MatchResult -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected booleanignoreApplicationContext(WebApplicationContext webApplicationContext) Returns if theWebApplicationContextshould be ignored and not used for matching.protected voidinitialized(Supplier<C> context) Method that can be implemented by subclasses that wish to initialize items the first time that the matcher is called.final booleanmatches(HttpServletRequest request) protected abstract booleanmatches(HttpServletRequest request, Supplier<C> context) Decides whether the rule implemented by the strategy matches the supplied request.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.springframework.security.web.util.matcher.RequestMatcher
matcher
-
构造器详细资料
-
ApplicationContextRequestMatcher
-
-
方法详细资料
-
matches
- 指定者:
matches在接口中RequestMatcher
-
ignoreApplicationContext
Returns if theWebApplicationContextshould be ignored and not used for matching. If this method returnstruethen the context will not be used and thematchesmethod will returnfalse.- 参数:
webApplicationContext- the candidate web application context- 返回:
- if the application context should be ignored
- 从以下版本开始:
- 2.1.8
-
initialized
Method that can be implemented by subclasses that wish to initialize items the first time that the matcher is called. This method will be called only once and only ifignoreApplicationContext(WebApplicationContext)returnsfalse. Note that the supplied context will be based on the first request sent to the matcher.- 参数:
context- a supplier for the initialized context (may throw an exception)- 另请参阅:
-
matches
Decides whether the rule implemented by the strategy matches the supplied request.- 参数:
request- the source requestcontext- a supplier for the initialized context (may throw an exception)- 返回:
- if the request matches
-