Class WebTemplateInterceptor
java.lang.Object
com.foreach.across.modules.web.template.WebTemplateInterceptor
- All Implemented Interfaces:
org.springframework.web.servlet.HandlerInterceptor
public class WebTemplateInterceptor
extends Object
implements org.springframework.web.servlet.HandlerInterceptor
Finds and applies the web template configured to a particular request.
Also provides support for partial rendering, though this assumes Thymeleaf templates.
Partial rendering
When a _partial parameter is present it will be parsed for a fragment and view element specification. The partial parameter can be of the following forms:
When a _partial parameter is present it will be parsed for a fragment and view element specification. The partial parameter can be of the following forms:
- FRAGMENT: only the template fragment that should be rendered
- ::VIEW_ELEMENT_NAME: only the name of the view element that should be rendered
- FRAGMENT::VIEW_ELEMENT_NAME: both template fragment and name of the view element that should be rendered
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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) void
setPrefixingPathRegistry
(PrefixingPathRegistry prefixingPathRegistry) 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
-
PROCESSOR_ATTRIBUTE
-
PARTIAL_PARAMETER
- See Also:
-
RENDER_FRAGMENT
- See Also:
-
RENDER_VIEW_ELEMENT
- See Also:
-
-
Constructor Details
-
WebTemplateInterceptor
-
-
Method Details
-
setPrefixingPathRegistry
-
preHandle
public boolean preHandle(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler) - Specified by:
preHandle
in interfaceorg.springframework.web.servlet.HandlerInterceptor
-
postHandle
public 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
-