クラス DefaultErrorViewResolver

java.lang.ObjectSE
org.springframework.boot.webmvc.autoconfigure.error.DefaultErrorViewResolver
実装済みのインターフェース一覧:
ErrorViewResolver, Ordered

public class DefaultErrorViewResolver extends ObjectSE implements ErrorViewResolver, Ordered
よく知られた規則を使用してエラービューを解決しようとするデフォルトの ErrorViewResolver 実装。status codestatus series を使用して、'/error' でテンプレートと静的アセットを検索します。

例: HTTP 404 は(特定の順序で)検索します:

  • '/<templates>/error/404.<ext>'
  • '/<static>/error/404.html'
  • '/<templates>/error/4xx.<ext>'
  • '/<static>/error/4xx.html'
導入:
4.0.0
作成者:
Phillip Webb, Andy Wilkinson
  • コンストラクターの詳細

    • DefaultErrorViewResolver

      public DefaultErrorViewResolver(ApplicationContext applicationContext, WebProperties.Resources resources)
      新しい DefaultErrorViewResolver インスタンスを作成します。
      パラメーター:
      applicationContext - ソースアプリケーションコンテキスト
      resources - リソースプロパティ
  • 方法の詳細

    • resolveErrorView

      public @Nullable ModelAndView resolveErrorView(HttpServletRequestEE request, HttpStatus status, MapSE<StringSE,ObjectSE> model)
      インターフェースからコピーされた説明: ErrorViewResolver
      指定された詳細のエラービューを解決します。
      次で指定:
      インターフェース ErrorViewResolver 内の resolveErrorView 
      パラメーター:
      request - ソースリクエスト
      status - エラーの http ステータス
      model - ビューで使用する推奨モデル
      戻り値:
      解決済みの ModelAndView または null
    • getOrder

      public int getOrder()
      次で指定:
      インターフェース Ordered 内の getOrder 
    • setOrder

      public void setOrder(int order)