The difference between Controller vs RestController in Spring

Publié le: 01 janvier 1970
sur la chaîne: Cameron McKenzie
2,375
82

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!


Sur cette page du site, vous pouvez voir la vidéo en ligne The difference between Controller vs RestController in Spring durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Cameron McKenzie 01 janvier 1970, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 2,375 fois et il a aimé 82 téléspectateurs. Bon visionnage!