类 DefaultErrorViewResolver
- java.lang.Object
- org.springframework.boot.autoconfigure.web.servlet.error.DefaultErrorViewResolver
- 所有已实现的接口:
ErrorViewResolver
,org.springframework.core.Ordered
public class DefaultErrorViewResolver extends Object implements ErrorViewResolver, org.springframework.core.Ordered
DefaultErrorViewResolver
implementation that attempts to resolve error views using well known conventions. Will search for templates and static assets under'/error'
using thestatus code
and thestatus 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'
- 从以下版本开始:
- 1.4.0
构造器概要
构造器 构造器 说明 DefaultErrorViewResolver(org.springframework.context.ApplicationContext applicationContext, ResourceProperties resourceProperties)
Create a newDefaultErrorViewResolver
instance.
构造器详细资料
DefaultErrorViewResolver
public DefaultErrorViewResolver(org.springframework.context.ApplicationContext applicationContext, ResourceProperties resourceProperties)
Create a newDefaultErrorViewResolver
instance.- 参数:
applicationContext
- the source application contextresourceProperties
- resource properties
方法详细资料
resolveErrorView
public org.springframework.web.servlet.ModelAndView resolveErrorView(javax.servlet.http.HttpServletRequest request, org.springframework.http.HttpStatus status, Map<String,Object> model)
从接口复制的说明:ErrorViewResolver
Resolve an error view for the specified details.- 指定者:
resolveErrorView
在接口中ErrorViewResolver
- 参数:
request
- the source requeststatus
- the http status of the errormodel
- the suggested model to be used with the view- 返回:
- a resolved
ModelAndView
ornull
getOrder
public int getOrder()
- 指定者:
getOrder
在接口中org.springframework.core.Ordered
setOrder
public void setOrder(int order)