public abstract class AbstractMessageReaderArgumentResolver extends Object
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<org.springframework.http.codec.HttpMessageReader<?>> readers,
org.springframework.validation.Validator validator)
Constructor with
HttpMessageReader's and a Validator. |
protected |
AbstractMessageReaderArgumentResolver(List<org.springframework.http.codec.HttpMessageReader<?>> messageReaders,
org.springframework.validation.Validator validator,
org.springframework.core.ReactiveAdapterRegistry adapterRegistry)
Constructor that also accepts a
ReactiveAdapterRegistry. |
| Modifier and Type | Method and Description |
|---|---|
protected <T> Function<T,T> |
applyValidationIfApplicable(org.springframework.core.MethodParameter methodParam) |
protected boolean |
checkRequired(org.springframework.core.ReactiveAdapter adapter,
boolean isBodyRequired) |
org.springframework.core.ReactiveAdapterRegistry |
getAdapterRegistry()
Return the configured
ReactiveAdapterRegistry. |
List<org.springframework.http.codec.HttpMessageReader<?>> |
getMessageReaders()
Return the configured message converters.
|
protected org.springframework.web.server.ServerWebInputException |
getReadError(Throwable ex,
org.springframework.core.MethodParameter parameter) |
protected org.springframework.web.server.ServerWebInputException |
getRequiredBodyError(org.springframework.core.MethodParameter parameter) |
protected reactor.core.publisher.Mono<Object> |
readBody(org.springframework.core.MethodParameter bodyParameter,
boolean isBodyRequired,
org.springframework.web.server.ServerWebExchange exchange) |
protected AbstractMessageReaderArgumentResolver(List<org.springframework.http.codec.HttpMessageReader<?>> readers, org.springframework.validation.Validator validator)
HttpMessageReader's and a Validator.readers - readers to convert from the request bodyvalidator - validator to validate decoded objects withprotected AbstractMessageReaderArgumentResolver(List<org.springframework.http.codec.HttpMessageReader<?>> messageReaders, org.springframework.validation.Validator validator, org.springframework.core.ReactiveAdapterRegistry adapterRegistry)
ReactiveAdapterRegistry.messageReaders - readers to convert from the request bodyvalidator - validator to validate decoded objects withadapterRegistry - for adapting to other reactive types from Flux and Monopublic List<org.springframework.http.codec.HttpMessageReader<?>> getMessageReaders()
public org.springframework.core.ReactiveAdapterRegistry getAdapterRegistry()
ReactiveAdapterRegistry.protected reactor.core.publisher.Mono<Object> readBody(org.springframework.core.MethodParameter bodyParameter, boolean isBodyRequired, org.springframework.web.server.ServerWebExchange exchange)
protected boolean checkRequired(org.springframework.core.ReactiveAdapter adapter,
boolean isBodyRequired)
protected org.springframework.web.server.ServerWebInputException getReadError(Throwable ex, org.springframework.core.MethodParameter parameter)
protected org.springframework.web.server.ServerWebInputException getRequiredBodyError(org.springframework.core.MethodParameter parameter)
protected <T> Function<T,T> applyValidationIfApplicable(org.springframework.core.MethodParameter methodParam)