Spring / Spring MVC Interview questions
Explain @RequestBody annotation in Spring MVC.
Spring automatically converts the content of the incoming request body to the parameter object when annotated with the @RequestBody annotation.
@ResponseBody @RequestMapping("/getUserInfo") public String getUserInformation(@RequestBody UserDetails user){ return user.getFirstName() + " " + user.getLastName(); }
More Related questions...