Summary
[Expand]
Inherited Methods |
From class
org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver
String
|
buildLogMessage(Exception ex, HttpServletRequest request)
Build a log message for the given exception, occured during processing the given request.
|
abstract
ModelAndView
|
doResolveException(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)
Actually resolve the given exception that got thrown during on handler execution,
returning a ModelAndView that represents a specific error page if appropriate.
|
int
|
getOrder()
Return the order value of this object, with a
higher value meaning greater in terms of sorting.
|
void
|
logException(Exception ex, HttpServletRequest request)
Log the given exception at warn level, provided that warn logging has been
activated through the "warnLogCategory" property.
|
void
|
prepareResponse(Exception ex, HttpServletResponse response)
Prepare the response for the exceptional case.
|
void
|
preventCaching(HttpServletResponse response)
Prevents the response from being cached, through setting corresponding
HTTP headers.
|
ModelAndView
|
resolveException(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)
Checks whether this resolver is supposed to apply (i.e.
|
void
|
setMappedHandlerClasses(Class[] mappedHandlerClasses)
Specify the set of classes that this exception resolver should apply to.
|
void
|
setMappedHandlers(Set mappedHandlers)
Specify the set of handlers that this exception resolver should apply to.
|
void
|
setOrder(int order)
|
void
|
setPreventResponseCaching(boolean preventResponseCaching)
Specify whether to prevent HTTP response caching for any view resolved
by this HandlerExceptionResolver.
|
void
|
setWarnLogCategory(String loggerName)
Set the log category for warn logging.
|
boolean
|
shouldApplyTo(HttpServletRequest request, Object handler)
Check whether this resolver is supposed to apply to the given handler.
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
From interface
org.springframework.core.Ordered
abstract
int
|
getOrder()
Return the order value of this object, with a
higher value meaning greater in terms of sorting.
|
|
From interface
org.springframework.web.servlet.HandlerExceptionResolver
abstract
ModelAndView
|
resolveException(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)
Try to resolve the given exception that got thrown during on handler execution,
returning a ModelAndView that represents a specific error page if appropriate.
|
|
Public Constructors
public
ResponseStatusExceptionResolver
()
Protected Methods
protected
ModelAndView
doResolveException
(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)
Actually resolve the given exception that got thrown during on handler execution,
returning a ModelAndView that represents a specific error page if appropriate.
May be overridden in subclasses, in order to apply specific exception checks.
Note that this template method will be invoked after checking whether this
resolved applies ("mappedHandlers" etc), so an implementation may simply proceed
with its actual exception handling.
Parameters
request
| current HTTP request |
response
| current HTTP response |
handler
| the executed handler, or null if none chosen at the time
of the exception (for example, if multipart resolution failed) |
ex
| the exception that got thrown during handler execution |
Returns
- a corresponding ModelAndView to forward to, or
null
for default processing
protected
ModelAndView
resolveResponseStatus
(ResponseStatus responseStatus, HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)
Parameters
responseStatus
| the annotation |
request
| current HTTP request |
response
| current HTTP response |
handler
| the executed handler, or null if none chosen at the time of the exception
(for example, if multipart resolution failed) |
ex
| the exception that got thrown during handler execution |
Returns
- a corresponding ModelAndView to forward to, or
null
for default processing