Supported for annotated handler methods in Spring MVC and Spring WebFlux as follows:
ModelAttribute.
If the method parameter type is Map and a request parameter name
is specified, then the request parameter value is converted to a Map
assuming an appropriate conversion strategy is available.
If the method parameter is Map<String, String> or
MultiValueMap<String, String>
and a parameter name is not specified, then the map parameter is populated
with all request parameter names and values.
RequestMapping, RequestHeader, CookieValue
| Modifier and Type | Method and Description |
|---|---|
| public String | defaultValue()
The default value to use as a fallback when the request parameter is not provided or has an empty value. |
| public String | |
| public boolean | |
| public String |
| defaultValue | back to summary |
|---|---|
| public String defaultValue() The default value to use as a fallback when the request parameter is not provided or has an empty value. Supplying a default value implicitly sets | |
| name | back to summary |
|---|---|
| public String name() The name of the request parameter to bind to.
| |
| required | back to summary |
|---|---|
| public boolean required() Whether the parameter is required. Defaults to Alternatively, provide a | |
| value | back to summary |
|---|---|
| public String value() Alias for
| |