@Target([AnnotationTarget.VALUE_PARAMETER]) class RequestAttribute
Annotation to bind a method parameter to a request attribute.
The main motivation is to provide convenient access to request attributes from a controller method with an optional/required check and a cast to the target method parameter type.
Author
Rossen Stoyanchev
Since
4.3
See Also
RequestMappingSessionAttribute
RequestAttribute(value: String, name: String, required: Boolean)
Annotation to bind a method parameter to a request attribute. The main motivation is to provide convenient access to request attributes from a controller method with an optional/required check and a cast to the target method parameter type. |
val name: String
The name of the request attribute to bind to. The default name is inferred from the method parameter name. |
|
val required: Boolean
Whether the request attribute is required. Defaults to |
|
val value: String
Alias for |