public class DefaultErrorViewResolver extends Object implements ErrorViewResolver, 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'HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description |
|---|
DefaultErrorViewResolver(ApplicationContext applicationContext,
ResourceProperties resourceProperties)
Deprecated.
since 2.4.0 for removal in 2.6.0 in favor of
#DefaultErrorViewResolver(ApplicationContext, Resources) |
DefaultErrorViewResolver(ApplicationContext applicationContext,
WebProperties.Resources resources)
Create a new
DefaultErrorViewResolver instance. |
| Modifier and Type | Method and Description |
|---|---|
int |
getOrder() |
ModelAndView |
resolveErrorView(HttpServletRequest request,
HttpStatus status,
Map<String,Object> model)
Resolve an error view for the specified details.
|
void |
setOrder(int order) |
@Deprecated public DefaultErrorViewResolver(ApplicationContext applicationContext, ResourceProperties resourceProperties)
#DefaultErrorViewResolver(ApplicationContext, Resources)DefaultErrorViewResolver instance.applicationContext - the source application contextresourceProperties - resource propertiespublic DefaultErrorViewResolver(ApplicationContext applicationContext, WebProperties.Resources resources)
DefaultErrorViewResolver instance.applicationContext - the source application contextresources - resource propertiespublic ModelAndView resolveErrorView(HttpServletRequest request, HttpStatus status, Map<String,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 void setOrder(int order)