クラス InitBinderDataBinderFactory

java.lang.ObjectSE
org.springframework.web.bind.support.DefaultDataBinderFactory
org.springframework.web.method.annotation.InitBinderDataBinderFactory
実装されているすべてのインターフェース:
WebDataBinderFactory
既知の直属サブクラス
ServletRequestDataBinderFactory

public class InitBinderDataBinderFactory extends DefaultDataBinderFactory
@InitBinder メソッドを介して WebDataBinder に初期化を追加します。
導入:
3.1
作成者:
Rossen Stoyanchev
  • コンストラクターの詳細

    • InitBinderDataBinderFactory

      public InitBinderDataBinderFactory(@Nullable ListSE<InvocableHandlerMethod> binderMethods, @Nullable WebBindingInitializer initializer)
      新しい InitBinderDataBinderFactory インスタンスを作成します。
      パラメーター:
      binderMethods - @InitBinder メソッド
      initializer - グローバルデータバインダーの初期化用
  • メソッドの詳細

    • initBinder

      public void initBinder(WebDataBinder dataBinder, NativeWebRequest request) throws ExceptionSE
      @InitBinder メソッドを使用して WebDataBinder を初期化します。

      @InitBinder アノテーションが属性名を指定している場合は、名前にターゲットオブジェクト名が含まれている場合にのみ呼び出されます。

      オーバーライド:
      クラス DefaultDataBinderFactoryinitBinder 
      パラメーター:
      dataBinder - カスタマイズするデータバインダーインスタンス
      request - 現在のリクエスト
      例外:
      ExceptionSE - 呼び出された @InitBinder メソッドの 1 つが失敗した場合
      関連事項:
    • isBinderMethodApplicable

      protected boolean isBinderMethodApplicable(HandlerMethod initBinderMethod, WebDataBinder dataBinder)
      指定された @InitBinder メソッドを使用して、指定された WebDataBinder インスタンスを初期化するかどうかを決定します。デフォルトでは、アノテーション値に指定された属性名があればそれをチェックします。