java.lang.Object | ||||
↳ | org.springframework.context.support.ApplicationObjectSupport | |||
↳ | org.springframework.web.context.support.WebApplicationObjectSupport | |||
↳ | org.springframework.web.servlet.support.WebContentGenerator | |||
↳ | org.springframework.web.servlet.mvc.WebContentInterceptor |
Interceptor that checks and prepares request and response. Checks for supported methods and a required session, and applies the specified number of cache seconds. See superclass bean properties for configuration options.
All the settings supported by this interceptor can also be set on AbstractController. This interceptor is mainly intended for applying checks and preparations to a set of controllers mapped by a HandlerMapping.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.web.servlet.support.WebContentGenerator
|
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.context.support.ApplicationObjectSupport
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This implementation is empty.
| |||||||||||
This implementation is empty.
| |||||||||||
Intercept the execution of a handler.
| |||||||||||
Set if URL lookup should always use full path within current servlet
context.
| |||||||||||
Map specific URL paths to specific cache seconds.
| |||||||||||
Set the PathMatcher implementation to use for matching URL paths
against registered URL patterns, for determining cache mappings.
| |||||||||||
Set if context path and request URI should be URL-decoded.
| |||||||||||
Set the UrlPathHelper to use for resolution of lookup paths.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Look up a cache seconds value for the given URL path.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.web.servlet.support.WebContentGenerator
| |||||||||||
From class
org.springframework.web.context.support.WebApplicationObjectSupport
| |||||||||||
From class
org.springframework.context.support.ApplicationObjectSupport
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.context.ApplicationContextAware
| |||||||||||
From interface
org.springframework.web.context.ServletContextAware
| |||||||||||
From interface
org.springframework.web.servlet.HandlerInterceptor
|
This implementation is empty.
request | current HTTP request |
---|---|
response | current HTTP response |
handler | chosen handler to execute, for type and/or instance examination |
ex | exception thrown on handler execution, if any |
Exception |
---|
This implementation is empty.
request | current HTTP request |
---|---|
response | current HTTP response |
handler | chosen handler to execute, for type and/or instance examination |
modelAndView | the ModelAndView that the handler returned
(can also be null ) |
Exception |
---|
Intercept the execution of a handler. Called after HandlerMapping determined an appropriate handler object, but before HandlerAdapter invokes the handler.
DispatcherServlet processes a handler in an execution chain, consisting of any number of interceptors, with the handler itself at the end. With this method, each interceptor can decide to abort the execution chain, typically sending a HTTP error or writing a custom response.
request | current HTTP request |
---|---|
response | current HTTP response |
handler | 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 |
---|
Set if URL lookup should always use full path within current servlet context. Else, the path within the current servlet mapping is used if applicable (i.e. in the case of a ".../*" servlet mapping in web.xml). Default is "false".
Only relevant for the "cacheMappings" setting.
Map specific URL paths to specific cache seconds.
Overrides the default cache seconds setting of this interceptor. Can specify "-1" to exclude a URL path from default caching.
Supports direct matches, e.g. a registered "/test" matches "/test", and a various Ant-style pattern matches, e.g. a registered "/t*" matches both "/test" and "/team". For details, see the AntPathMatcher javadoc.
cacheMappings | a mapping between URL paths (as keys) and cache seconds (as values, need to be integer-parsable) |
---|
Set the PathMatcher implementation to use for matching URL paths against registered URL patterns, for determining cache mappings. Default is AntPathMatcher.
Set if context path and request URI should be URL-decoded. Both are returned undecoded by the Servlet API, in contrast to the servlet path.
Uses either the request encoding or the default encoding according to the Servlet spec (ISO-8859-1).
Only relevant for the "cacheMappings" setting.
Set the UrlPathHelper to use for resolution of lookup paths.
Use this to override the default UrlPathHelper with a custom subclass, or to share common UrlPathHelper settings across multiple HandlerMappings and MethodNameResolvers.
Only relevant for the "cacheMappings" setting.
Look up a cache seconds value for the given URL path.
Supports direct matches, e.g. a registered "/test" matches "/test", and various Ant-style pattern matches, e.g. a registered "/t*" matches both "/test" and "/team". For details, see the AntPathMatcher class.
urlPath | URL the bean is mapped to |
---|
null
if not found