As you can see in Spring documentation (Spring RestController Documentation) Rest Controller annotation is the same as Controller annotation, but assuming that @ResponseBody
is active by default, so all the Java objects are serialized to JSON representation in the response body.