@RequestHeader except for
Map arguments. See RequestHeaderMapMethodArgumentResolver for
details on Map arguments annotated with @RequestHeader.
An @RequestHeader is a named value resolved from a request header.
It has a required flag and a default value to fall back on when the request
header does not exist.
A WebDataBinder is invoked to apply type conversion to resolved
request header values that don't yet match the method parameter type.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Access | Constructor and Description |
|---|---|
| public | RequestHeaderMethodArgumentResolver(ConfigurableBeanFactory
a bean factory to use for resolving ${...}
placeholder and #{...} SpEL expressions in default values;
or beanFactory)null if default values are not expected to have expressionsCreate a new |
| Modifier and Type | Method and Description |
|---|---|
| protected AbstractNamedValueMethodArgumentResolver. | createNamedValueInfo(MethodParameter
the method parameter parameter)Implements abstract org. NamedValueInfo object for the given method parameter.
|
| protected void | handleMissingValue(String
the name for the value name, MethodParameter the method parameter parameter)
Invoked when a named value is required, but resolveName(String, MethodParameter, NativeWebRequest)
returned null and there is no default value.
|
| protected void | handleMissingValueAfterConversion(String
the name for the value name, MethodParameter the method parameter parameter, NativeWebRequest the current request request)
Invoked when a named value is present but becomes null after conversion.
|
| protected Object | resolveName(String
the name of the value being resolved name, MethodParameter the method parameter to resolve to an argument value
(pre-nested in case of a parameter, NativeWebRequest java. declaration)the current request request)Implements abstract org. |
| public boolean | supportsParameter(MethodParameter
the method parameter to check parameter)Implements org. |
| RequestHeaderMethodArgumentResolver | back to summary |
|---|---|
| public RequestHeaderMethodArgumentResolver(ConfigurableBeanFactory beanFactory) Create a new
| |
| createNamedValueInfo | back to summary |
|---|---|
| protected AbstractNamedValueMethodArgumentResolver. Implements abstract org. Create the
| |
| handleMissingValue | back to summary |
|---|---|
| protected void handleMissingValue(String name, MethodParameter parameter) throws ServletRequestBindingException Invoked when a named value is required, but
| |
| handleMissingValueAfterConversion | back to summary |
|---|---|
| protected void handleMissingValueAfterConversion(String name, MethodParameter parameter, NativeWebRequest request) throws Exception Invoked when a named value is present but becomes
| |
| resolveName | back to summary |
|---|---|
| protected Object resolveName(String name, MethodParameter parameter, NativeWebRequest request) throws Exception Implements abstract org. Doc from org. Resolve the given parameter type and value name into an argument value.
| |
| supportsParameter | back to summary |
|---|---|
| public boolean supportsParameter(MethodParameter parameter) Implements org. Doc from org. Whether the given method parameter is supported by this resolver.
| |
| Access | Constructor and Description |
|---|---|
| private |
| RequestHeaderNamedValueInfo | back to summary |
|---|---|
| private RequestHeaderNamedValueInfo(RequestHeader annotation) | |