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<org.springframework.http.codec.HttpMessageReader<?>> readers,
org.springframework.validation.Validator validator)
Constructor with
HttpMessageReader 's and a Validator . |
HttpEntityArgumentResolver(List<org.springframework.http.codec.HttpMessageReader<?>> readers,
org.springframework.validation.Validator validator,
org.springframework.core.ReactiveAdapterRegistry adapterRegistry)
Constructor that also accepts a
ReactiveAdapterRegistry . |
Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Mono<Object> |
resolveArgument(org.springframework.core.MethodParameter param,
org.springframework.ui.ModelMap model,
org.springframework.web.server.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(org.springframework.core.MethodParameter parameter) |
applyValidationIfApplicable, checkRequired, getAdapterRegistry, getMessageReaders, getReadError, getRequiredBodyError, readBody
public HttpEntityArgumentResolver(List<org.springframework.http.codec.HttpMessageReader<?>> readers, org.springframework.validation.Validator validator)
HttpMessageReader
's and a Validator
.readers
- readers for de-serializing the request body withvalidator
- validator to validate decoded objects withpublic HttpEntityArgumentResolver(List<org.springframework.http.codec.HttpMessageReader<?>> readers, org.springframework.validation.Validator validator, org.springframework.core.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(org.springframework.core.MethodParameter parameter)
supportsParameter
in interface HandlerMethodArgumentResolver
public reactor.core.publisher.Mono<Object> resolveArgument(org.springframework.core.MethodParameter param, org.springframework.ui.ModelMap model, org.springframework.web.server.ServerWebExchange exchange)
HandlerMethodArgumentResolver
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.resolveArgument
in interface HandlerMethodArgumentResolver
param
- the method parametermodel
- the implicit model for request handlingexchange
- the current exchange