• A class annotated with the @Controller annotation has handler methods which return a view. 
  • However, if we use @ResponseBody annotation along with @Controller annotation, it will return the data directly in a serialized format.
  • Starting from Spring 4 and above, we can use @RestController annotation which is equivalent to using @Controller and @ResposeBody annotation.