类 DefaultErrorViewResolver
- java.lang.Object
- org.springframework.boot.autoconfigure.web.DefaultErrorViewResolver
- 所有已实现的接口:
ErrorViewResolver,org.springframework.core.Ordered
public class DefaultErrorViewResolver extends Object implements ErrorViewResolver, org.springframework.core.Ordered
DefaultErrorViewResolverimplementation that attempts to resolve error views using well known conventions. Will search for templates and static assets under'/error'using thestatus codeand thestatus series.For example, an
HTTP 404will 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 newDefaultErrorViewResolverinstance.
构造器详细资料
DefaultErrorViewResolver
public DefaultErrorViewResolver(org.springframework.context.ApplicationContext applicationContext, ResourceProperties resourceProperties)
Create a newDefaultErrorViewResolverinstance.- 参数:
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)
从接口复制的说明:ErrorViewResolverResolve 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
ModelAndViewornull
getOrder
public int getOrder()
- 指定者:
getOrder在接口中org.springframework.core.Ordered
setOrder
public void setOrder(int order)