The difference between Controller vs RestController in Spring

Pubblicato il: 01 gennaio 1970
sul canale di: Cameron McKenzie
2,663
92

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!


In questa pagina del sito puoi guardare il video online The difference between Controller vs RestController in Spring della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Cameron McKenzie 01 gennaio 1970, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 2,663 volte e gli è piaciuto 92 spettatori. Buona visione!