类的使用
org.springframework.web.bind.WebDataBinder
使用WebDataBinder的程序包 程序包 说明 org.springframework.web.bind Provides web-specific data binding functionality.org.springframework.web.bind.support Support classes for web data binding.org.springframework.web.method.annotation Support classes for annotation-based handler method processing.org.springframework.web.servlet.mvc.method.annotation MVC infrastructure for annotation-based handler method processing, building on theorg.springframework.web.method.annotationpackage.org.springframework.web.bind中WebDataBinder的使用
org.springframework.web.bind中WebDataBinder的子类 修饰符和类型 类 说明 classServletRequestDataBinderSpecialDataBinderto perform data binding from servlet request parameters to JavaBeans, including support for multipart files.org.springframework.web.bind.support中WebDataBinder的使用
org.springframework.web.bind.support中WebDataBinder的子类 修饰符和类型 类 说明 classWebExchangeDataBinderSpecializedDataBinderto perform data binding from URL query params or form data in the request data to Java objects.classWebRequestDataBinderSpecialDataBinderto perform data binding from web request parameters to JavaBeans, including support for multipart files.返回WebDataBinder的org.springframework.web.bind.support中的方法 修饰符和类型 方法 说明 WebDataBinderDefaultDataBinderFactory. createBinder(NativeWebRequest webRequest, Object target, String objectName)Create a newWebDataBinderfor the given target object and initialize it through aWebBindingInitializer.WebDataBinderWebDataBinderFactory. createBinder(NativeWebRequest webRequest, Object target, String objectName)Create aWebDataBinderfor the given object.protected WebDataBinderDefaultDataBinderFactory. createBinderInstance(Object target, String objectName, NativeWebRequest webRequest)Extension point to create the WebDataBinder instance.参数类型为WebDataBinder的org.springframework.web.bind.support中的方法 修饰符和类型 方法 说明 voidConfigurableWebBindingInitializer. initBinder(WebDataBinder binder)protected voidDefaultDataBinderFactory. initBinder(WebDataBinder dataBinder, NativeWebRequest webRequest)Extension point to further initialize the created data binder instance (e.g. with@InitBindermethods) after "global" initialization viaWebBindingInitializer.voidWebBindingInitializer. initBinder(WebDataBinder binder)Initialize the given DataBinder.default voidWebBindingInitializer. initBinder(WebDataBinder binder, WebRequest request)已过时。as of 5.0 in favor ofWebBindingInitializer.initBinder(WebDataBinder)org.springframework.web.method.annotation中WebDataBinder的使用
参数类型为WebDataBinder的org.springframework.web.method.annotation中的方法 修饰符和类型 方法 说明 protected voidModelAttributeMethodProcessor. bindRequestParameters(WebDataBinder binder, NativeWebRequest request)Extension point to bind the request to the target object.voidInitBinderDataBinderFactory. initBinder(WebDataBinder dataBinder, NativeWebRequest request)Initialize a WebDataBinder with@InitBindermethods.protected booleanInitBinderDataBinderFactory. isBinderMethodApplicable(HandlerMethod initBinderMethod, WebDataBinder dataBinder)Determine whether the given@InitBindermethod should be used to initialize the givenWebDataBinderinstance.protected booleanModelAttributeMethodProcessor. isBindExceptionRequired(WebDataBinder binder, MethodParameter parameter)Whether to raise a fatal bind exception on validation errors.protected voidModelAttributeMethodProcessor. validateIfApplicable(WebDataBinder binder, MethodParameter parameter)Validate the model attribute if applicable.protected voidModelAttributeMethodProcessor. validateValueIfApplicable(WebDataBinder binder, MethodParameter parameter, Class<?> targetType, String fieldName, Object value)Validate the specified candidate value if applicable.org.springframework.web.servlet.mvc.method.annotation中WebDataBinder的使用
org.springframework.web.servlet.mvc.method.annotation中WebDataBinder的子类 修饰符和类型 类 说明 classExtendedServletRequestDataBinderSubclass ofServletRequestDataBinderthat adds URI template variables to the values used for data binding.参数类型为WebDataBinder的org.springframework.web.servlet.mvc.method.annotation中的方法 修饰符和类型 方法 说明 protected voidServletModelAttributeMethodProcessor. bindRequestParameters(WebDataBinder binder, NativeWebRequest request)This implementation downcastsWebDataBindertoServletRequestDataBinderbefore binding.protected booleanAbstractMessageConverterMethodArgumentResolver. isBindExceptionRequired(WebDataBinder binder, MethodParameter parameter)Whether to raise a fatal bind exception on validation errors.protected voidAbstractMessageConverterMethodArgumentResolver. validateIfApplicable(WebDataBinder binder, MethodParameter parameter)Validate the binding target if applicable.