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 […]

654 total views, no views today

» Read more