@Target([AnnotationTarget.VALUE_PARAMETER]) class PathVariable
Annotation which indicates that a method parameter should be bound to a URI template variable. Supported for RequestMapping annotated handler methods in Servlet environments.
If the method parameter is java.util.Map or org.springframework.util.MultiValueMap then the map is populated with all path variable names and values.
Author
Arjen Poutsma
Author
Juergen Hoeller
Since
3.0
See Also
RequestMappingorg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter
PathVariable(value: String, name: String, required: Boolean)
Annotation which indicates that a method parameter should be bound to a URI template variable. Supported for RequestMapping annotated handler methods in Servlet environments. If the method parameter is java.util.Map or org.springframework.util.MultiValueMap then the map is populated with all path variable names and values. |
val name: String
The name of the path variable to bind to. |
|
val required: Boolean
Whether the path variable is required. Defaults to |
|
val value: String
Alias for |