Class WebExchangeDataBinder
java.lang.Object
org.springframework.validation.DataBinder
org.springframework.web.bind.WebDataBinder
org.springframework.web.bind.support.WebExchangeDataBinder
- All Implemented Interfaces:
- PropertyEditorRegistry,- TypeConverter
Specialized 
DataBinder to perform data
 binding from URL query parameters or form data in the request data to Java objects.
 WARNING: Data binding can lead to security issues by exposing parts of the object graph that are not meant to be accessed or modified by external clients. Therefore the design and use of data binding should be considered carefully with regard to security. For more details, please refer to the dedicated sections on data binding for Spring Web MVC and Spring WebFlux in the reference manual.
- Since:
- 5.0
- Author:
- Rossen Stoyanchev, Juergen Hoeller
- 
Field SummaryFields inherited from class org.springframework.web.bind.WebDataBinderDEFAULT_FIELD_DEFAULT_PREFIX, DEFAULT_FIELD_MARKER_PREFIXFields inherited from class org.springframework.validation.DataBinderDEFAULT_AUTO_GROW_COLLECTION_LIMIT, DEFAULT_OBJECT_NAME, logger
- 
Constructor SummaryConstructorsConstructorDescriptionWebExchangeDataBinder(Object target) Create a new instance, with default object name.WebExchangeDataBinder(Object target, String objectName) Create a new instance.
- 
Method SummaryModifier and TypeMethodDescriptionprotected static voidreactor.core.publisher.Mono<Void>bind(ServerWebExchange exchange) Bind query parameters, form data, or multipart form data to the binder target.extractValuesToBind(ServerWebExchange exchange) Combine query params and form data for multipart form data from the body of the request into aMap<String, Object>of values to use for data binding purposes.getValuesToBind(ServerWebExchange exchange) Obtain the values for data binding.Methods inherited from class org.springframework.web.bind.WebDataBinderadaptEmptyArrayIndices, bindMultipart, checkFieldDefaults, checkFieldMarkers, doBind, getEmptyValue, getEmptyValue, getFieldDefaultPrefix, getFieldMarkerPrefix, isBindEmptyMultipartFiles, setBindEmptyMultipartFiles, setFieldDefaultPrefix, setFieldMarkerPrefixMethods inherited from class org.springframework.validation.DataBinderaddCustomFormatter, addCustomFormatter, addCustomFormatter, addValidators, applyPropertyValues, bind, checkAllowedFields, checkRequiredFields, close, convertIfNecessary, convertIfNecessary, convertIfNecessary, convertIfNecessary, createBeanPropertyBindingResult, createDirectFieldBindingResult, findCustomEditor, getAllowedFields, getAutoGrowCollectionLimit, getBindingErrorProcessor, getBindingResult, getConversionService, getDisallowedFields, getInternalBindingResult, getObjectName, getPropertyAccessor, getPropertyEditorRegistry, getRequiredFields, getSimpleTypeConverter, getTarget, getTypeConverter, getValidator, getValidators, initBeanPropertyAccess, initDirectFieldAccess, isAllowed, isAutoGrowNestedPaths, isIgnoreInvalidFields, isIgnoreUnknownFields, registerCustomEditor, registerCustomEditor, replaceValidators, setAllowedFields, setAutoGrowCollectionLimit, setAutoGrowNestedPaths, setBindingErrorProcessor, setConversionService, setDisallowedFields, setIgnoreInvalidFields, setIgnoreUnknownFields, setMessageCodesResolver, setRequiredFields, setValidator, validate, validate
- 
Constructor Details- 
WebExchangeDataBinderCreate a new instance, with default object name.- Parameters:
- target- the target object to bind onto (or- nullif the binder is just used to convert a plain parameter value)
- See Also:
 
- 
WebExchangeDataBinderCreate a new instance.- Parameters:
- target- the target object to bind onto (or- nullif the binder is just used to convert a plain parameter value)
- objectName- the name of the target object
 
 
- 
- 
Method Details- 
bindBind query parameters, form data, or multipart form data to the binder target.- Parameters:
- exchange- the current exchange
- Returns:
- a Mono<Void>when binding is complete
 
- 
getValuesToBindObtain the values for data binding. By default, this delegates toextractValuesToBind(ServerWebExchange).- Parameters:
- exchange- the current exchange
- Returns:
- a map of bind values
- Since:
- 5.3
 
- 
extractValuesToBindpublic static reactor.core.publisher.Mono<Map<String,Object>> extractValuesToBind(ServerWebExchange exchange) Combine query params and form data for multipart form data from the body of the request into aMap<String, Object>of values to use for data binding purposes.- Parameters:
- exchange- the current exchange
- Returns:
- a Monowith the values to bind
- See Also:
 
- 
addBindValue
 
-