Please correct me if I am wrong. Both can be used for Data Binding.
The question is when to use @ModelAttribute?
@RequestMapping(val
@ModelAttribute is used for binding data from request param (in key value pairs),
@ModelAttribute
but @RequestBody is used for binding data from whole body of the request like POST,PUT.. request types which contains other format like json, xml.
@RequestBody