Package org.springframework.web.filter
Class ServletRequestPathFilter
java.lang.Object
org.springframework.web.filter.ServletRequestPathFilter
- All Implemented Interfaces:
Filter
A
Filter
to parse
and cache a RequestPath
for further
access
throughout the
filter chain. This is useful when parsed
PathPattern
s are in use anywhere
in an application instead of String pattern matching with
PathMatcher
.
Note that in Spring MVC, the DispatcherServlet
will also parse and
cache the RequestPath
if it detects that parsed PathPatterns
are enabled for any HandlerMapping
but it will skip doing that if it
finds the ServletRequestPathUtils.PATH_ATTRIBUTE
already exists.
- Since:
- 5.3
- Author:
- Rossen Stoyanchev
-
Constructor Details
-
ServletRequestPathFilter
public ServletRequestPathFilter()
-
-
Method Details
-
doFilter
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException - Specified by:
doFilter
in interfaceFilter
- Throws:
IOException
ServletException
-