public abstract class AbstractMessageReaderArgumentResolver extends HandlerMethodArgumentResolverSupport
HttpMessageReader
.
Applies validation if the method argument is annotated with
@javax.validation.Valid
or
Validated
. Validation
failure results in an ServerWebInputException
.
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
- 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
- the MethodParameter
to readactualParam
- the actual MethodParameter
to read; could be different
from bodyParameter
when processing HttpEntity
for exampleisBodyRequired
- true if the body is requiredbindingContext
- the binding context to useexchange
- the current exchange