@Target(value=PARAMETER)
@Retention(value=RUNTIME)
@Documented
public @interface MatrixVariable
RequestMapping
annotated handler methods in Servlet environments.Modifier and Type | Optional Element and Description |
---|---|
java.lang.String |
defaultValue
The default value to use as a fallback.
|
java.lang.String |
pathVar
The name of the URI path variable where the matrix variable is located,
if necessary for disambiguation (e.g.
|
boolean |
required
Whether the matrix variable is required.
|
java.lang.String |
value
The name of the matrix variable.
|
public abstract java.lang.String value
public abstract java.lang.String pathVar
public abstract boolean required
Default is true
, leading to an exception thrown in case
of the variable missing in the request. Switch this to false
if you prefer a null
in case of the variable missing.
Alternatively, provide a defaultValue
,
which implicitly sets this flag to false
.
public abstract java.lang.String defaultValue
required()
to false.