类 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 anApplicationContext
or a class of anexisting bean
.
- 所有已实现的接口:
org.springframework.security.web.util.matcher.RequestMatcher
public abstract class ApplicationContextRequestMatcher<C> extends Object implements org.springframework.security.web.util.matcher.RequestMatcher
ApplicationContext
backedRequestMatcher
. Can work directly with theApplicationContext
, obtain an existing bean orcreate a new bean
that is autowired in the usual way.- 从以下版本开始:
- 2.0.0
构造器概要
构造器 构造器 说明 ApplicationContextRequestMatcher(Class<? extends C> contextClass)
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 protected void
initialized(Supplier<C> context)
Called once the context has been initialized.boolean
matches(javax.servlet.http.HttpServletRequest request)
protected abstract boolean
matches(javax.servlet.http.HttpServletRequest request, Supplier<C> context)
Decides whether the rule implemented by the strategy matches the supplied request.
构造器详细资料
ApplicationContextRequestMatcher
public ApplicationContextRequestMatcher(Class<? extends C> contextClass)
方法详细资料
matches
public final boolean matches(javax.servlet.http.HttpServletRequest request)
- 指定者:
matches
在接口中org.springframework.security.web.util.matcher.RequestMatcher
matches
protected abstract boolean matches(javax.servlet.http.HttpServletRequest request, Supplier<C> context)
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
initialized
protected void initialized(Supplier<C> context)
Called once the context has been initialized.- 参数:
context
- a supplier for the initialized context (may throw an exception)