T
- The argument typepublic class QueryValueArgumentBinder<T> extends AbstractAnnotatedArgumentBinder<QueryValue,T,HttpRequest<?>> implements AnnotatedRequestArgumentBinder<QueryValue,T>
ArgumentBinder.BindingResult<T>
Constructor and Description |
---|
QueryValueArgumentBinder(ConversionService<?> conversionService)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
ArgumentBinder.BindingResult<T> |
bind(ArgumentConversionContext<T> context,
HttpRequest<?> source)
Binds the argument with
QueryValue annotation to the request
(Also binds without annotation if request body is not permitted). |
Class<QueryValue> |
getAnnotationType() |
doBind, doBind, doConvert, doConvert, doResolve, getFallbackFormat
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
of
public QueryValueArgumentBinder(ConversionService<?> conversionService)
conversionService
- conversion servicepublic Class<QueryValue> getAnnotationType()
getAnnotationType
in interface AnnotatedArgumentBinder<QueryValue,T,HttpRequest<?>>
public ArgumentBinder.BindingResult<T> bind(ArgumentConversionContext<T> context, HttpRequest<?> source)
QueryValue
annotation to the request
(Also binds without annotation if request body is not permitted).
It will first try to convert to ConvertibleMultiValues type and if conversion is successful, add the
corresponding parameters to the request. (By default the conversion will be successful if the Format
annotation is present and has one of the supported values - see
MultiValuesConverterFactory
for specific converters). Otherwise
the uri template will be used to deduce what will be done with the request. For example, simple parameters are
converted to String
bind
in interface ArgumentBinder<T,HttpRequest<?>>
context
- The ArgumentConversionContext
source
- The sourceOptional
of the value. If no binding was possible Optional.empty()