Difference between @Controller and @RestController

Difference between @Controller and @RestController: @Controller and @RestController is not having much difference, its just a matter of convenience to use @ResponseBody with @Controller. In simple way, we can understand like this: @RestController = @Controller + @ResponseBody     @Controller: @ResponseBody annotation should be used for RequestMapping methods to render any outputs like json/xml etc.   Code Sample: Here @ResponseBody

320 total views, no views today

» Read more

Spring Boot + Rest Controller Simple Demo

Spring boot is becoming familiar along with angular. spring boot can be used for standalone and batch projects. In Angular it is used for backend with rest controllers. So knowing how to use spring boot with rest controller will be very helpful for angular backend java developments. Prerequisite: Spring STS Tool If you dont have you can download and install

348 total views, no views today

» Read more