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.
logger| Constructor and Description |
|---|
RequestPartMethodArgumentResolver(List<org.springframework.http.codec.HttpMessageReader<?>> readers,
org.springframework.core.ReactiveAdapterRegistry registry) |
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Flux<org.springframework.http.codec.multipart.Part> |
getPartValues(org.springframework.core.MethodParameter parameter,
org.springframework.web.bind.annotation.RequestPart requestPart,
boolean isRequired,
org.springframework.web.server.ServerWebExchange exchange) |
reactor.core.publisher.Mono<Object> |
resolveArgument(org.springframework.core.MethodParameter parameter,
BindingContext bindingContext,
org.springframework.web.server.ServerWebExchange exchange)
Resolve the value for the method parameter.
|
boolean |
supportsParameter(org.springframework.core.MethodParameter parameter)
Whether this resolver supports the given method parameter.
|
getMessageReaders, readBody, readBodycheckAnnotatedParamNoReactiveWrapper, checkParameterType, checkParameterTypeNoReactiveWrapper, getAdapterRegistrypublic RequestPartMethodArgumentResolver(List<org.springframework.http.codec.HttpMessageReader<?>> readers, org.springframework.core.ReactiveAdapterRegistry registry)
public boolean supportsParameter(org.springframework.core.MethodParameter parameter)
HandlerMethodArgumentResolverparameter - the method parameterpublic reactor.core.publisher.Mono<Object> resolveArgument(org.springframework.core.MethodParameter parameter, BindingContext bindingContext, org.springframework.web.server.ServerWebExchange exchange)
HandlerMethodArgumentResolverparameter - the method parameterbindingContext - the binding context to useexchange - the current exchangeMono for the argument value, possibly emptypublic reactor.core.publisher.Flux<org.springframework.http.codec.multipart.Part> getPartValues(org.springframework.core.MethodParameter parameter,
@Nullable
org.springframework.web.bind.annotation.RequestPart requestPart,
boolean isRequired,
org.springframework.web.server.ServerWebExchange exchange)