public class DefaultErrorViewResolver extends java.lang.Object implements ErrorViewResolver, org.springframework.core.Ordered
ErrorViewResolver implementation that attempts to resolve error views
using well known conventions. Will search for templates and static assets under
'/error' using the status code and the
status series.
For example, an HTTP 404 will search (in the specific order):
'/<templates>/error/404.<ext>''/<static>/error/404.html''/<templates>/error/4xx.<ext>''/<static>/error/4xx.html'| Constructor and Description |
|---|
DefaultErrorViewResolver(org.springframework.context.ApplicationContext applicationContext,
WebProperties.Resources resources)
Create a new
DefaultErrorViewResolver instance. |
| Modifier and Type | Method and Description |
|---|---|
int |
getOrder() |
org.springframework.web.servlet.ModelAndView |
resolveErrorView(javax.servlet.http.HttpServletRequest request,
org.springframework.http.HttpStatus status,
java.util.Map<java.lang.String,java.lang.Object> model)
Resolve an error view for the specified details.
|
void |
setOrder(int order) |
public DefaultErrorViewResolver(org.springframework.context.ApplicationContext applicationContext,
WebProperties.Resources resources)
DefaultErrorViewResolver instance.applicationContext - the source application contextresources - resource propertiespublic org.springframework.web.servlet.ModelAndView resolveErrorView(javax.servlet.http.HttpServletRequest request,
org.springframework.http.HttpStatus status,
java.util.Map<java.lang.String,java.lang.Object> model)
ErrorViewResolverresolveErrorView in interface ErrorViewResolverrequest - the source requeststatus - the http status of the errormodel - the suggested model to be used with the viewModelAndView or nullpublic int getOrder()
getOrder in interface org.springframework.core.Orderedpublic void setOrder(int order)