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 are reactive type for a single or multiple values.
Constructor and Description |
---|
RequestPartMethodArgumentResolver(List<HttpMessageReader<?>> readers,
ReactiveAdapterRegistry registry) |
Modifier and Type | Method and Description |
---|---|
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 empty