类 ResourceUrlProviderExposingInterceptor
- java.lang.Object
- org.springframework.web.servlet.handler.HandlerInterceptorAdapter
- org.springframework.web.servlet.resource.ResourceUrlProviderExposingInterceptor
- 所有已实现的接口:
AsyncHandlerInterceptor
,HandlerInterceptor
public class ResourceUrlProviderExposingInterceptor extends HandlerInterceptorAdapter
An interceptor that exposes theResourceUrlProvider
instance it is configured with as a request attribute.- 从以下版本开始:
- 4.1
- 作者:
- Rossen Stoyanchev
字段概要
字段 修饰符和类型 字段 说明 static String
RESOURCE_URL_PROVIDER_ATTR
Name of the request attribute that holds theResourceUrlProvider
.
构造器概要
构造器 构造器 说明 ResourceUrlProviderExposingInterceptor(ResourceUrlProvider resourceUrlProvider)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 boolean
preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
This implementation always returnstrue
.从类继承的方法 org.springframework.web.servlet.handler.HandlerInterceptorAdapter
afterCompletion, afterConcurrentHandlingStarted, postHandle
字段详细资料
RESOURCE_URL_PROVIDER_ATTR
public static final String RESOURCE_URL_PROVIDER_ATTR
Name of the request attribute that holds theResourceUrlProvider
.
构造器详细资料
ResourceUrlProviderExposingInterceptor
public ResourceUrlProviderExposingInterceptor(ResourceUrlProvider resourceUrlProvider)
方法详细资料
preHandle
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception
从类复制的说明:HandlerInterceptorAdapter
This implementation always returnstrue
.- 指定者:
preHandle
在接口中HandlerInterceptor
- 覆盖:
preHandle
在类中HandlerInterceptorAdapter
- 参数:
request
- current HTTP requestresponse
- current HTTP responsehandler
- chosen handler to execute, for type and/or instance evaluation- 返回:
true
if the execution chain should proceed with the next interceptor or the handler itself. Else, DispatcherServlet assumes that this interceptor has already dealt with the response itself.- 抛出:
Exception
- in case of errors