Class RequestPartArgumentResolver
java.lang.Object
org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver
org.springframework.web.service.invoker.RequestPartArgumentResolver
- All Implemented Interfaces:
HttpServiceArgumentResolver
HttpServiceArgumentResolver for @RequestPart
annotated arguments.
The argument may be:
- String -- form field
Resource-- file partMultipartFile-- uploaded file- Object -- content to be encoded (e.g. to JSON)
HttpEntity-- part content and headers although generally it's easier to add headers through the returned builderPart-- a part from a server requestPublisherof any of the above
- Since:
- 6.0
- Author:
- Rossen Stoyanchev
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver
AbstractNamedValueArgumentResolver.NamedValueInfo -
Field Summary
Fields inherited from class org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver
logger -
Constructor Summary
ConstructorsConstructorDescriptionRequestPartArgumentResolver(HttpExchangeAdapter exchangeAdapter) Constructor with aHttpExchangeAdapter, for access to config settings. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddRequestValue(String name, Object value, org.springframework.core.MethodParameter parameter, HttpRequestValues.Builder requestValues) Add the given, single request value.createNamedValueInfo(org.springframework.core.MethodParameter parameter) Return information about the request value, ornullif the parameter does not represent a request value of interest.Methods inherited from class org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver
resolve
-
Constructor Details
-
RequestPartArgumentResolver
Constructor with aHttpExchangeAdapter, for access to config settings.- Since:
- 6.1
-
-
Method Details
-
createNamedValueInfo
protected AbstractNamedValueArgumentResolver.NamedValueInfo createNamedValueInfo(org.springframework.core.MethodParameter parameter) Description copied from class:AbstractNamedValueArgumentResolverReturn information about the request value, ornullif the parameter does not represent a request value of interest.- Specified by:
createNamedValueInfoin classAbstractNamedValueArgumentResolver
-
addRequestValue
protected void addRequestValue(String name, Object value, org.springframework.core.MethodParameter parameter, HttpRequestValues.Builder requestValues) Description copied from class:AbstractNamedValueArgumentResolverAdd the given, single request value. This may be called multiples times if the request value is multivalued.If the resolver was created with a
ConversionService, the value will have been converted to a String and may be cast down.- Specified by:
addRequestValuein classAbstractNamedValueArgumentResolver- Parameters:
name- the request value namevalue- the valueparameter- the method parameter type, nested if Map, List/array, or OptionalrequestValues- builder to add the request value to
-