The difference between the Spring Controller versus RestController is the fact that the RestController implicitly adds the ResponseBody annotation to every HTTP handling method while you have to do that explicitly with the standard Spring Controller from Spring MVC.
That's it. That's the only difference between the Spring Controller and RestController.
So when do you use the Spring RestController over the Controller? Well, any time you're doing RESTful API development with Spring Boot! That's when!
On this page of the site you can watch the video online The difference between Controller vs RestController in Spring with a duration of hours minute second in good quality, which was uploaded by the user Cameron McKenzie 01 January 1970, share the link with friends and acquaintances, this video has already been watched 2,375 times on youtube and it was liked by 82 viewers. Enjoy your viewing!