August 2017
Beginner to intermediate
370 pages
8h 37m
English
This section represents the concepts related to the usage of the @ResponseBody annotation for returning a response to the client request.
The @ResponseBody annotation can be applied both at the class level and the method level. When @ResponseBody is applied at the class level along with the @Controller annotation, another annotation such as @RestController can be used instead.
The @ResonseBody annotation represents the fact that the value returned by the method will form the body of the response. When the value returned is an object, the object is converted into an appropriate JSON or XML format by HttpMessageConverters. The format is decided based on the value of the produce attribute of the @RequestMapping ...
Read now
Unlock full access