Class InitBinderDataBinderFactory
java.lang.Object
org.springframework.web.bind.support.DefaultDataBinderFactory
org.springframework.web.method.annotation.InitBinderDataBinderFactory
- All Implemented Interfaces:
- WebDataBinderFactory
- Direct Known Subclasses:
- ServletRequestDataBinderFactory
Adds initialization to a WebDataBinder via 
@InitBinder methods.- Since:
- 3.1
- Author:
- Rossen Stoyanchev
- 
Constructor SummaryConstructorsConstructorDescriptionInitBinderDataBinderFactory(@Nullable List<InvocableHandlerMethod> binderMethods, @Nullable WebBindingInitializer initializer) Create a new InitBinderDataBinderFactory instance.
- 
Method SummaryModifier and TypeMethodDescriptionvoidinitBinder(WebDataBinder dataBinder, NativeWebRequest request) Initialize a WebDataBinder with@InitBindermethods.protected booleanisBinderMethodApplicable(HandlerMethod initBinderMethod, WebDataBinder dataBinder) Determine whether the given@InitBindermethod should be used to initialize the givenWebDataBinderinstance.Methods inherited from class DefaultDataBinderFactorycreateBinder, createBinder, createBinderInstance, setMethodValidationApplicable
- 
Constructor Details- 
InitBinderDataBinderFactorypublic InitBinderDataBinderFactory(@Nullable List<InvocableHandlerMethod> binderMethods, @Nullable WebBindingInitializer initializer) Create a new InitBinderDataBinderFactory instance.- Parameters:
- binderMethods-- @InitBindermethods
- initializer- for global data binder initialization
 
 
- 
- 
Method Details- 
initBinderInitialize a WebDataBinder with@InitBindermethods.If the @InitBinderannotation specifies attributes names, it is invoked only if the names include the target object name.- Overrides:
- initBinderin class- DefaultDataBinderFactory
- Parameters:
- dataBinder- the data binder instance to customize
- request- the current request
- Throws:
- Exception- if one of the invoked @- InitBindermethods fails
- See Also:
 
- 
isBinderMethodApplicableprotected boolean isBinderMethodApplicable(HandlerMethod initBinderMethod, WebDataBinder dataBinder) Determine whether the given@InitBindermethod should be used to initialize the givenWebDataBinderinstance. By default we check the specified attribute names in the annotation value, if any.
 
-