public class InitBinderDataBinderFactory extends DefaultDataBinderFactory
@InitBinder methods.| Constructor and Description |
|---|
InitBinderDataBinderFactory(java.util.List<InvocableHandlerMethod> binderMethods,
WebBindingInitializer initializer)
Create a new InitBinderDataBinderFactory instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
initBinder(WebDataBinder binder,
NativeWebRequest request)
Initialize a WebDataBinder with
@InitBinder methods. |
protected boolean |
isBinderMethodApplicable(HandlerMethod binderMethod,
WebDataBinder binder)
Whether the given
@InitBinder method should be used to initialize
the given WebDataBinder instance. |
createBinder, createBinderInstancepublic InitBinderDataBinderFactory(@Nullable java.util.List<InvocableHandlerMethod> binderMethods, @Nullable WebBindingInitializer initializer)
binderMethods - @InitBinder methodsinitializer - for global data binder initializationpublic void initBinder(WebDataBinder binder, NativeWebRequest request) throws java.lang.Exception
@InitBinder methods.
If the @InitBinder annotation specifies attributes names, it is
invoked only if the names include the target object name.initBinder in class DefaultDataBinderFactorybinder - the data binder instance to customizerequest - the current requestjava.lang.Exception - if one of the invoked @InitBinder methods fail.protected boolean isBinderMethodApplicable(HandlerMethod binderMethod, WebDataBinder binder)
@InitBinder method should be used to initialize
the given WebDataBinder instance. By default we check the attributes
names of the annotation, if present.