public class RequestBodyArgumentResolver extends AbstractMessageReaderArgumentResolver
@RequestBody
by reading the
body of the request through a compatible HttpMessageReader
.
An @RequestBody
method argument is also validated if it is
annotated with @javax.validation.Valid
or
Validated
. Validation
failure results in an ServerWebInputException
.
Constructor and Description |
---|
RequestBodyArgumentResolver(List<HttpMessageReader<?>> readers,
ReactiveAdapterRegistry registry) |
Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Mono<Object> |
resolveArgument(MethodParameter param,
BindingContext bindingContext,
ServerWebExchange exchange)
Resolve the value for the method parameter.
|
boolean |
supportsParameter(MethodParameter parameter)
Whether this resolver supports the given method parameter.
|
getMessageReaders, readBody, readBody
checkAnnotatedParamNoReactiveWrapper, checkParameterType, checkParameterTypeNoReactiveWrapper, getAdapterRegistry
public RequestBodyArgumentResolver(List<HttpMessageReader<?>> readers, ReactiveAdapterRegistry registry)
public boolean supportsParameter(MethodParameter parameter)
HandlerMethodArgumentResolver
parameter
- the method parameterpublic reactor.core.publisher.Mono<Object> resolveArgument(MethodParameter param, BindingContext bindingContext, ServerWebExchange exchange)
HandlerMethodArgumentResolver
param
- the method parameterbindingContext
- the binding context to useexchange
- the current exchangeMono
for the argument value, possibly empty