public class Jackson2ServletRequestDataBinderFactory
extends org.springframework.web.servlet.mvc.method.annotation.ServletRequestDataBinderFactory
ServletRequestDataBinderFactory
to use the
DataBinder
in current Thread used in deserialization process that
contains the BindingResult
.
Note by doing that the BindingResult
of JSON deserialization process
will be send to Controller as method parameter.Constructor and Description |
---|
Jackson2ServletRequestDataBinderFactory(List<org.springframework.web.method.support.InvocableHandlerMethod> binderMethods,
org.springframework.web.bind.support.WebBindingInitializer initializer)
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected org.springframework.web.bind.ServletRequestDataBinder |
createBinderInstance(Object target,
String objectName,
org.springframework.web.context.request.NativeWebRequest request)
Look current Thread for
ServletRequestDataBinder created by
DataBinderMappingJackson2HttpMessageConverter , if found return
it, otherwise it delegates on parent method. |
initBinder, isBinderMethodApplicable
public Jackson2ServletRequestDataBinderFactory(List<org.springframework.web.method.support.InvocableHandlerMethod> binderMethods, org.springframework.web.bind.support.WebBindingInitializer initializer)
binderMethods
- one or more @InitBinder
methodsinitializer
- provides global data binder initializationprotected org.springframework.web.bind.ServletRequestDataBinder createBinderInstance(Object target, String objectName, org.springframework.web.context.request.NativeWebRequest request)
ServletRequestDataBinder
created by
DataBinderMappingJackson2HttpMessageConverter
, if found return
it, otherwise it delegates on parent method.createBinderInstance
in class org.springframework.web.servlet.mvc.method.annotation.ServletRequestDataBinderFactory
target
- objectName
- request
- Copyright © 2010–2015 General Directorate for Information Technologies (DGTI) of the Regional Ministry of Finance and Public Administration of the Generalitat Valenciana.. All rights reserved.