public class HttpEntityArgumentResolver extends AbstractMessageReaderArgumentResolver implements HandlerMethodArgumentResolver
HttpEntity or RequestEntity
by reading the body of the request through a compatible
HttpMessageReader.| Constructor and Description |
|---|
HttpEntityArgumentResolver(List<HttpMessageReader<?>> readers,
Validator validator)
Constructor with
HttpMessageReader's and a Validator. |
HttpEntityArgumentResolver(List<HttpMessageReader<?>> readers,
Validator validator,
ReactiveAdapterRegistry adapterRegistry)
Constructor that also accepts a
ReactiveAdapterRegistry. |
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<Object> |
resolveArgument(MethodParameter param,
ModelMap model,
ServerWebExchange exchange)
The returned
Mono may produce one or zero values if the argument
does not resolve to any value, which will result in null passed
as the argument value. |
boolean |
supportsParameter(MethodParameter parameter) |
applyValidationIfApplicable, checkRequired, getAdapterRegistry, getMessageReaders, getReadError, getRequiredBodyError, readBodypublic HttpEntityArgumentResolver(List<HttpMessageReader<?>> readers, Validator validator)
HttpMessageReader's and a Validator.readers - readers for de-serializing the request body withvalidator - validator to validate decoded objects withpublic HttpEntityArgumentResolver(List<HttpMessageReader<?>> readers, Validator validator, ReactiveAdapterRegistry adapterRegistry)
ReactiveAdapterRegistry.readers - readers for de-serializing the request body withvalidator - validator to validate decoded objects withadapterRegistry - for adapting to other reactive types from Flux and Monopublic boolean supportsParameter(MethodParameter parameter)
supportsParameter in interface HandlerMethodArgumentResolverpublic reactor.core.publisher.Mono<Object> resolveArgument(MethodParameter param, ModelMap model, ServerWebExchange exchange)
HandlerMethodArgumentResolverMono may produce one or zero values if the argument
does not resolve to any value, which will result in null passed
as the argument value.resolveArgument in interface HandlerMethodArgumentResolverparam - the method parametermodel - the implicit model for request handlingexchange - the current exchange