public class WebExchangeDataBinder extends WebDataBinder
DataBinder
to perform data
binding from URL query params or form data in the request data to Java objects.DEFAULT_FIELD_DEFAULT_PREFIX, DEFAULT_FIELD_MARKER_PREFIX
DEFAULT_AUTO_GROW_COLLECTION_LIMIT, DEFAULT_OBJECT_NAME, logger
Constructor and Description |
---|
WebExchangeDataBinder(Object target)
Create a new instance, with default object name.
|
WebExchangeDataBinder(Object target,
String objectName)
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Mono<Void> |
bind(ServerWebExchange exchange)
Bind query params, form data, and or multipart form data to the binder target.
|
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 a
Map<String, Object> of values to use for
data binding purposes. |
protected reactor.core.publisher.Mono<Map<String,Object>> |
getValuesToBind(ServerWebExchange exchange)
Protected method to obtain the values for data binding.
|
bindMultipart, checkFieldDefaults, checkFieldMarkers, doBind, getEmptyValue, getEmptyValue, getFieldDefaultPrefix, getFieldMarkerPrefix, isBindEmptyMultipartFiles, setBindEmptyMultipartFiles, setFieldDefaultPrefix, setFieldMarkerPrefix
addCustomFormatter, addCustomFormatter, addCustomFormatter, addValidators, applyPropertyValues, bind, checkAllowedFields, checkRequiredFields, close, 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
public WebExchangeDataBinder(@Nullable Object target)
target
- the target object to bind onto (or null
if the
binder is just used to convert a plain parameter value)DataBinder.DEFAULT_OBJECT_NAME
public reactor.core.publisher.Mono<Void> bind(ServerWebExchange exchange)
exchange
- the current exchange.Mono<Void>
when binding is completeprotected reactor.core.publisher.Mono<Map<String,Object>> getValuesToBind(ServerWebExchange exchange)
extractValuesToBind(ServerWebExchange)
.public static reactor.core.publisher.Mono<Map<String,Object>> extractValuesToBind(ServerWebExchange exchange)
Map<String, Object>
of values to use for
data binding purposes.exchange
- the current exchangeMono
with the values to bindServerHttpRequest.getQueryParams()
,
ServerWebExchange.getFormData()
,
ServerWebExchange.getMultipartData()