Class ExtendedWebExchangeDataBinder

java.lang.Object
org.springframework.validation.DataBinder
org.springframework.web.bind.WebDataBinder
org.springframework.web.bind.support.WebExchangeDataBinder
org.springframework.web.reactive.result.ExtendedWebExchangeDataBinder
All Implemented Interfaces:
org.springframework.beans.PropertyEditorRegistry, org.springframework.beans.TypeConverter
Direct Known Subclasses:
ExtendedWebExchangeDataBinder

public class ExtendedWebExchangeDataBinder extends org.springframework.web.bind.support.WebExchangeDataBinder
Extended variant of WebExchangeDataBinder that adds URI path variables and request headers to the bind values map.
Since:
7.0.2
Author:
Rossen Stoyanchev, Juergen Hoeller
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.springframework.validation.DataBinder

    org.springframework.validation.DataBinder.NameResolver, org.springframework.validation.DataBinder.ValueResolver
  • Field Summary

    Fields inherited from class org.springframework.web.bind.WebDataBinder

    DEFAULT_FIELD_DEFAULT_PREFIX, DEFAULT_FIELD_MARKER_PREFIX

    Fields inherited from class org.springframework.validation.DataBinder

    DEFAULT_AUTO_GROW_COLLECTION_LIMIT, DEFAULT_OBJECT_NAME, logger
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create a new instance, with default object name.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Add a Predicate that filters the header names to use for data binding.
    reactor.core.publisher.Mono<Map<String,Object>>
    getValuesToBind(org.springframework.web.server.ServerWebExchange exchange)
     
    void
    Set the Predicate that filters the header names to use for data binding.

    Methods inherited from class org.springframework.web.bind.support.WebExchangeDataBinder

    addBindValue, bind, construct, extractValuesToBind, shouldConstructArgument

    Methods inherited from class org.springframework.web.bind.WebDataBinder

    adaptEmptyArrayIndices, bindMultipart, checkFieldDefaults, checkFieldMarkers, doBind, getEmptyValue, getEmptyValue, getFieldDefaultPrefix, getFieldMarkerPrefix, isBindEmptyMultipartFiles, resolvePrefixValue, setBindEmptyMultipartFiles, setFieldDefaultPrefix, setFieldMarkerPrefix

    Methods inherited from class org.springframework.validation.DataBinder

    addCustomFormatter, addCustomFormatter, addCustomFormatter, addValidators, applyPropertyValues, bind, checkAllowedFields, checkRequiredFields, close, construct, convertIfNecessary, convertIfNecessary, convertIfNecessary, convertIfNecessary, createBeanPropertyBindingResult, createDirectFieldBindingResult, findCustomEditor, getAllowedFields, getAutoGrowCollectionLimit, getBindingErrorProcessor, getBindingResult, getConversionService, getDisallowedFields, getInternalBindingResult, getNameResolver, getObjectName, getPropertyAccessor, getPropertyEditorRegistry, getRequiredFields, getSimpleTypeConverter, getTarget, getTargetType, getTypeConverter, getValidator, getValidators, getValidatorsToApply, initBeanPropertyAccess, initDirectFieldAccess, isAllowed, isAutoGrowNestedPaths, isDeclarativeBinding, isIgnoreInvalidFields, isIgnoreUnknownFields, registerCustomEditor, registerCustomEditor, replaceValidators, setAllowedFields, setAutoGrowCollectionLimit, setAutoGrowNestedPaths, setBindingErrorProcessor, setConversionService, setDeclarativeBinding, setDisallowedFields, setExcludedValidators, setIgnoreInvalidFields, setIgnoreUnknownFields, setMessageCodesResolver, setNameResolver, setRequiredFields, setTargetType, setValidator, shouldNotBindPropertyValues, validate, validate

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExtendedWebExchangeDataBinder

      public ExtendedWebExchangeDataBinder(@Nullable Object target)
      Create a new instance, with default object name.
      Parameters:
      target - the target object to bind onto (or null if the binder is just used to convert a plain parameter value)
      See Also:
      • DataBinder.DEFAULT_OBJECT_NAME
    • ExtendedWebExchangeDataBinder

      public ExtendedWebExchangeDataBinder(@Nullable Object target, String objectName)
  • Method Details

    • addHeaderPredicate

      public void addHeaderPredicate(Predicate<String> headerPredicate)
      Add a Predicate that filters the header names to use for data binding. Multiple predicates are combined with AND.
      Parameters:
      headerPredicate - the predicate to add
      Since:
      6.2.1
    • setHeaderPredicate

      public void setHeaderPredicate(Predicate<String> headerPredicate)
      Set the Predicate that filters the header names to use for data binding.

      Note that this method resets any previous predicates that may have been set, including headers excluded by default such as the RFC 9218 defined "Priority" header.

      Parameters:
      headerPredicate - the predicate to add
      Since:
      6.2.1
    • getValuesToBind

      public reactor.core.publisher.Mono<Map<String,Object>> getValuesToBind(org.springframework.web.server.ServerWebExchange exchange)
      Overrides:
      getValuesToBind in class org.springframework.web.bind.support.WebExchangeDataBinder