@Target([AnnotationTarget.VALUE_PARAMETER]) class MatrixVariable
Annotation which indicates that a method parameter should be bound to a name-value pair within a path segment. Supported for RequestMapping annotated handler methods in Servlet environments.
If the method parameter type is java.util.Map and a matrix variable name is specified, then the matrix variable value is converted to a java.util.Map assuming an appropriate conversion strategy is available.
If the method parameter is java.util.Map or org.springframework.util.MultiValueMap and a variable name is not specified, then the map is populated with all matrix variable names and values.
Author
Rossen Stoyanchev
Author
Sam Brannen
Since
3.2
MatrixVariable(value: String, name: String, pathVar: String, required: Boolean, defaultValue: String)
Annotation which indicates that a method parameter should be bound to a name-value pair within a path segment. Supported for RequestMapping annotated handler methods in Servlet environments. If the method parameter type is java.util.Map and a matrix variable name is specified, then the matrix variable value is converted to a java.util.Map assuming an appropriate conversion strategy is available. If the method parameter is java.util.Map or org.springframework.util.MultiValueMap and a variable name is not specified, then the map is populated with all matrix variable names and values. |
val defaultValue: String
The default value to use as a fallback. Supplying a default value implicitly sets |
|
val name: String
The name of the matrix variable. |
|
val pathVar: String
The name of the URI path variable where the matrix variable is located, if necessary for disambiguation (e.g. a matrix variable with the same name present in more than one path segment). |
|
val required: Boolean
Whether the matrix variable is required. Default is Alternatively, provide a |
|
val value: String
Alias for |