public class ConversionServiceExposingInterceptor extends HandlerInterceptorAdapter
ConversionService
in request scope
so it's available during request processing. The request attribute name is
"org.springframework.core.convert.ConversionService", the value of
ConversionService.class.getName()
.
Mainly for use within JSP tags such as the spring:eval tag.
Constructor and Description |
---|
ConversionServiceExposingInterceptor(ConversionService conversionService)
Creates a new
ConversionServiceExposingInterceptor . |
Modifier and Type | Method and Description |
---|---|
boolean |
preHandle(HttpServletRequest request,
HttpServletResponse response,
Object handler)
This implementation always returns
true . |
afterCompletion, afterConcurrentHandlingStarted, postHandle
public ConversionServiceExposingInterceptor(ConversionService conversionService)
ConversionServiceExposingInterceptor
.conversionService
- the conversion service to export to request scope when this interceptor is invokedpublic boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws ServletException, IOException
HandlerInterceptorAdapter
true
.preHandle
in interface HandlerInterceptor
preHandle
in class HandlerInterceptorAdapter
request
- current HTTP requestresponse
- current HTTP responsehandler
- chosen handler to execute, for type and/or instance evaluationtrue
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