HttpServiceArgumentResolver for @RequestHeader
annotated arguments.
The argument may be:
Map<String, ?> or
MultiValueMap<String, ?>
with multiple headers and value(s).
Collection or an array of header values.
Individual header values may be Strings or Objects to be converted to
String values through the configured ConversionService.
If the value is required but null, IllegalArgumentException
is raised. The value is not required if:
RequestHeader#required() is set to false
RequestHeader#defaultValue() provides a fallback value
java.util.Optional
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | addRequestValue(String
the request value name name, Object the value value, MethodParameter the method parameter type, nested if Map, List/array, or Optional parameter, HttpRequestValues.builder to add the request value to requestValuesImplements abstract org. Add the given, single request value. |
| protected AbstractNamedValueArgumentResolver. | createNamedValueInfo(MethodParameter parameter)
Implements abstract org. Return information about the request value, or |
| RequestHeaderArgumentResolver | back to summary |
|---|---|
| public RequestHeaderArgumentResolver(ConversionService conversionService) | |
| addRequestValue | back to summary |
|---|---|
| protected void addRequestValue(String name, Object value, MethodParameter parameter, HttpRequestValues. Implements abstract org. Doc from org. 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
| |
| createNamedValueInfo | back to summary |
|---|---|
| protected AbstractNamedValueArgumentResolver. Implements abstract org. Doc from org. Return information about the request value, or
| |