Package io.micronaut.http.bind.binders
Class QueryValueArgumentBinder<T>
- java.lang.Object
-
- io.micronaut.core.bind.annotation.AbstractAnnotatedArgumentBinder<QueryValue,T,HttpRequest<?>>
-
- io.micronaut.http.bind.binders.QueryValueArgumentBinder<T>
-
- Type Parameters:
T- The argument type
- All Implemented Interfaces:
io.micronaut.core.bind.annotation.AnnotatedArgumentBinder<QueryValue,T,HttpRequest<?>>,io.micronaut.core.bind.ArgumentBinder<T,HttpRequest<?>>,AnnotatedRequestArgumentBinder<QueryValue,T>,RequestArgumentBinder<T>
public class QueryValueArgumentBinder<T> extends io.micronaut.core.bind.annotation.AbstractAnnotatedArgumentBinder<QueryValue,T,HttpRequest<?>> implements AnnotatedRequestArgumentBinder<QueryValue,T>
A binder for binding arguments annotated with @QueryValue.- Since:
- 2.0.2
-
-
Constructor Summary
Constructors Constructor Description QueryValueArgumentBinder(io.micronaut.core.convert.ConversionService<?> conversionService)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.micronaut.core.bind.ArgumentBinder.BindingResult<T>bind(io.micronaut.core.convert.ArgumentConversionContext<T> context, HttpRequest<?> source)Binds the argument withQueryValueannotation to the request (Also binds without annotation if request body is not permitted).java.lang.Class<QueryValue>getAnnotationType()
-
-
-
Method Detail
-
getAnnotationType
public java.lang.Class<QueryValue> getAnnotationType()
- Specified by:
getAnnotationTypein interfaceio.micronaut.core.bind.annotation.AnnotatedArgumentBinder<QueryValue,T,HttpRequest<?>>
-
bind
public io.micronaut.core.bind.ArgumentBinder.BindingResult<T> bind(io.micronaut.core.convert.ArgumentConversionContext<T> context, HttpRequest<?> source)
Binds the argument withQueryValueannotation 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 theFormatannotation is present and has one of the supported values - seeMultiValuesConverterFactoryfor specific converters). Otherwise the uri template will be used to deduce what will be done with the request. For example, simple parameters are converted toString- Specified by:
bindin interfaceio.micronaut.core.bind.ArgumentBinder<T,HttpRequest<?>>
-
-