Class MultipartFileArgumentResolver
java.lang.Object
org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver
org.springframework.web.service.invoker.MultipartFileArgumentResolver
- All Implemented Interfaces:
HttpServiceArgumentResolver
HttpServiceArgumentResolver
for arguments of type MultipartFile
.
The argument is recognized by type, and does not need to be annotated. To make
it optional, declare the parameter with an Optional
wrapper.- Since:
- 6.1
- Author:
- Olga Maciaszek-Sharma, 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
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addRequestValue
(String name, Object value, MethodParameter parameter, HttpRequestValues.Builder values) Add the given, single request value.createNamedValueInfo
(MethodParameter parameter) Return information about the request value, ornull
if the parameter does not represent a request value of interest.Methods inherited from class org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver
resolve
-
Constructor Details
-
MultipartFileArgumentResolver
public MultipartFileArgumentResolver()
-
-
Method Details
-
createNamedValueInfo
protected AbstractNamedValueArgumentResolver.NamedValueInfo createNamedValueInfo(MethodParameter parameter) Description copied from class:AbstractNamedValueArgumentResolver
Return information about the request value, ornull
if the parameter does not represent a request value of interest.- Specified by:
createNamedValueInfo
in classAbstractNamedValueArgumentResolver
-
addRequestValue
protected void addRequestValue(String name, Object value, MethodParameter parameter, HttpRequestValues.Builder values) Description copied from class:AbstractNamedValueArgumentResolver
Add 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:
addRequestValue
in classAbstractNamedValueArgumentResolver
- Parameters:
name
- the request value namevalue
- the valueparameter
- the method parameter type, nested if Map, List/array, or Optionalvalues
- builder to add the request value to
-