Class LogHandlerAndViewNameInterceptor
java.lang.Object
com.foreach.across.modules.logging.request.LogHandlerAndViewNameInterceptor
- All Implemented Interfaces:
org.springframework.web.servlet.HandlerInterceptor
public class LogHandlerAndViewNameInterceptor
extends Object
implements org.springframework.web.servlet.HandlerInterceptor
Interceptor that registers both the handler name and view name as request attribute.
Used by the
RequestLoggerFilter
.- Author:
- Arne Vandamme
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
postHandle
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler, org.springframework.web.servlet.ModelAndView modelAndView) boolean
preHandle
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.web.servlet.HandlerInterceptor
afterCompletion
-
Field Details
-
ATTRIBUTE_HANDLER
-
ATTRIBUTE_VIEW_NAME
-
-
Constructor Details
-
LogHandlerAndViewNameInterceptor
public LogHandlerAndViewNameInterceptor()
-
-
Method Details
-
preHandle
public boolean preHandle(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler) throws Exception - Specified by:
preHandle
in interfaceorg.springframework.web.servlet.HandlerInterceptor
- Throws:
Exception
-
postHandle
public final void postHandle(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler, org.springframework.web.servlet.ModelAndView modelAndView) - Specified by:
postHandle
in interfaceorg.springframework.web.servlet.HandlerInterceptor
-