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!
Смотрите видео The difference between Controller vs RestController in Spring онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал Cameron McKenzie 01 Январь 1970. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 1,329 раз и оно понравилось 43 посетителям.