クラス DefaultErrorAttributes

java.lang.ObjectSE
org.springframework.boot.webflux.error.DefaultErrorAttributes
実装済みのインターフェース一覧:
ErrorAttributes

public class DefaultErrorAttributes extends ObjectSE implements ErrorAttributes
ErrorAttributes のデフォルト実装。可能な場合、次の属性を提供します。
  • timestamp - エラーが抽出された時間
  • status - 状態コード
  • error - エラーの理由
  • exception - ルート例外のクラス名 (設定されている場合)
  • message - 例外メッセージ (設定されている場合)
  • errors - BindingResult または MethodValidationResult 例外(設定されている場合)に起因する検証エラー。JSON への安全な直列化を保証するため、エラーは wrapped if necessary です。
  • trace - 例外スタックトレース (設定されている場合)
  • path - 例外が発生したときの URL パス
  • requestId - 現在のリクエストに関連付けられた一意の ID
導入:
4.0.0
作成者:
Brian Clozel, Stephane Nicoll, Michele Mancioppi, Scott Frederick, Moritz Halbritter, Yanming Zhou, Yongjun Hong
関連事項:
  • コンストラクターの詳細

    • DefaultErrorAttributes

      public DefaultErrorAttributes()
  • 方法の詳細

    • getErrorAttributes

      public MapSE<StringSE, @Nullable ObjectSE> getErrorAttributes(ServerRequest request, ErrorAttributeOptions options)
      インターフェースからコピーされた説明: ErrorAttributes
      エラー属性の MapSE を返します。マップは、エラーページのモデルとして使用するか、ServerResponse 本文として返すことができます。
      次で指定:
      インターフェース ErrorAttributes 内の getErrorAttributes 
      パラメーター:
      request - ソースリクエスト
      options - エラー属性コンテンツのオプション
      戻り値:
      エラー属性のマップ
    • getError

      public ThrowableSE getError(ServerRequest request)
      インターフェースからコピーされた説明: ErrorAttributes
      エラーの根本的な原因を返すか、エラーを抽出できない場合は null を返します。
      次で指定:
      インターフェース ErrorAttributes 内の getError 
      パラメーター:
      request - ソース ServerRequest
      戻り値:
      エラーまたは null の原因となった ExceptionSE
    • storeErrorInformation

      public void storeErrorInformation(ThrowableSE error, ServerWebExchange exchange)
      インターフェースからコピーされた説明: ErrorAttributes
      指定されたエラー情報を現在の ServerWebExchange に保存します。
      次で指定:
      インターフェース ErrorAttributes 内の storeErrorInformation 
      パラメーター:
      error - エラーの原因となった ExceptionSE
      exchange - ソース交換