@Target([AnnotationTarget.VALUE_PARAMETER]) class RequestBody
Annotation indicating a method parameter should be bound to the body of the web request. The body of the request is passed through an HttpMessageConverter to resolve the method argument depending on the content type of the request. Optionally, automatic validation can be applied by annotating the argument with @Valid
.
Supported for annotated handler methods in Servlet environments.
Author
Arjen Poutsma
Since
3.0
See Also
RequestHeaderResponseBodyorg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter
RequestBody(required: Boolean)
Annotation indicating a method parameter should be bound to the body of the web request. The body of the request is passed through an HttpMessageConverter to resolve the method argument depending on the content type of the request. Optionally, automatic validation can be applied by annotating the argument with Supported for annotated handler methods in Servlet environments. |
val required: Boolean
Whether body content is required. Default is |