public abstract class AbstractMessageReaderArgumentResolver extends HandlerMethodArgumentResolverSupport
HttpMessageReader
.
Applies validation if the method argument is annotated with any
annotations that trigger validation. Validation failure results in a
ServerWebInputException
.
logger
Modifier | Constructor and Description |
---|---|
protected |
AbstractMessageReaderArgumentResolver(List<HttpMessageReader<?>> readers)
Constructor with
HttpMessageReader 's and a Validator . |
protected |
AbstractMessageReaderArgumentResolver(List<HttpMessageReader<?>> messageReaders,
ReactiveAdapterRegistry adapterRegistry)
Constructor that also accepts a
ReactiveAdapterRegistry . |
Modifier and Type | Method and Description |
---|---|
List<HttpMessageReader<?>> |
getMessageReaders()
Return the configured message converters.
|
protected reactor.core.publisher.Mono<Object> |
readBody(MethodParameter bodyParameter,
boolean isBodyRequired,
BindingContext bindingContext,
ServerWebExchange exchange)
Read the body from a method argument with
HttpMessageReader . |
protected reactor.core.publisher.Mono<Object> |
readBody(MethodParameter bodyParam,
MethodParameter actualParam,
boolean isBodyRequired,
BindingContext bindingContext,
ServerWebExchange exchange)
Read the body from a method argument with
HttpMessageReader . |
checkAnnotatedParamNoReactiveWrapper, checkParameterType, checkParameterTypeNoReactiveWrapper, getAdapterRegistry
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
resolveArgument, supportsParameter
protected AbstractMessageReaderArgumentResolver(List<HttpMessageReader<?>> readers)
HttpMessageReader
's and a Validator
.readers
- the readers to convert from the request bodyprotected AbstractMessageReaderArgumentResolver(List<HttpMessageReader<?>> messageReaders, ReactiveAdapterRegistry adapterRegistry)
ReactiveAdapterRegistry
.messageReaders
- readers to convert from the request bodyadapterRegistry
- for adapting to other reactive types from Flux and Monopublic List<HttpMessageReader<?>> getMessageReaders()
protected reactor.core.publisher.Mono<Object> readBody(MethodParameter bodyParameter, boolean isBodyRequired, BindingContext bindingContext, ServerWebExchange exchange)
HttpMessageReader
.bodyParameter
- the MethodParameter
to readisBodyRequired
- true if the body is requiredbindingContext
- the binding context to useexchange
- the current exchangereadBody(MethodParameter, MethodParameter, boolean, BindingContext, ServerWebExchange)
protected reactor.core.publisher.Mono<Object> readBody(MethodParameter bodyParam, @Nullable MethodParameter actualParam, boolean isBodyRequired, BindingContext bindingContext, ServerWebExchange exchange)
HttpMessageReader
.bodyParam
- represents the element type for the bodyactualParam
- the actual method argument type; possibly different
from bodyParam
, e.g. for an HttpEntity
argumentisBodyRequired
- true if the body is requiredbindingContext
- the binding context to useexchange
- the current exchange