类 ConversionServiceExposingInterceptor
- java.lang.Object
- org.springframework.web.servlet.handler.HandlerInterceptorAdapter
- org.springframework.web.servlet.handler.ConversionServiceExposingInterceptor
- 所有已实现的接口:
AsyncHandlerInterceptor
,HandlerInterceptor
public class ConversionServiceExposingInterceptor extends HandlerInterceptorAdapter
Interceptor that places the configuredConversionService
in request scope so it's available during request processing. The request attribute name is "org.springframework.core.convert.ConversionService", the value ofConversionService.class.getName()
.Mainly for use within JSP tags such as the spring:eval tag.
- 从以下版本开始:
- 3.0.1
- 作者:
- Keith Donald
构造器概要
构造器 构造器 说明 ConversionServiceExposingInterceptor(ConversionService conversionService)
Creates a newConversionServiceExposingInterceptor
.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 boolean
preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
This implementation always returnstrue
.从类继承的方法 org.springframework.web.servlet.handler.HandlerInterceptorAdapter
afterCompletion, afterConcurrentHandlingStarted, postHandle
构造器详细资料
ConversionServiceExposingInterceptor
public ConversionServiceExposingInterceptor(ConversionService conversionService)
Creates a newConversionServiceExposingInterceptor
.- 参数:
conversionService
- the conversion service to export to request scope when this interceptor is invoked
方法详细资料
preHandle
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws ServletException, IOException
从类复制的说明: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.- 抛出:
ServletException
IOException