public class RequestPartMethodArgumentResolver extends AbstractMessageReaderArgumentResolver
@RequestPart
arguments where the named part is decoded
much like an @RequestBody
argument but based on the content of an
individual part instead. The arguments may be wrapped with a reactive type
for a single value (e.g. Reactor Mono
, RxJava Single
).
This resolver also supports arguments of type Part
which may be
wrapped with a reactive type for a single value or multiple values.
logger
Constructor and Description |
---|
RequestPartMethodArgumentResolver(List<HttpMessageReader<?>> readers,
ReactiveAdapterRegistry registry) |
Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Flux<Part> |
getPartValues(MethodParameter parameter,
RequestPart requestPart,
boolean isRequired,
ServerWebExchange exchange) |
reactor.core.publisher.Mono<Object> |
resolveArgument(MethodParameter parameter,
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 RequestPartMethodArgumentResolver(List<HttpMessageReader<?>> readers, ReactiveAdapterRegistry registry)
public boolean supportsParameter(MethodParameter parameter)
HandlerMethodArgumentResolver
parameter
- the method parameterpublic reactor.core.publisher.Mono<Object> resolveArgument(MethodParameter parameter, BindingContext bindingContext, ServerWebExchange exchange)
HandlerMethodArgumentResolver
parameter
- the method parameterbindingContext
- the binding context to useexchange
- the current exchangeMono
for the argument value, possibly emptypublic reactor.core.publisher.Flux<Part> getPartValues(MethodParameter parameter, @Nullable RequestPart requestPart, boolean isRequired, ServerWebExchange exchange)