Difference between @Controller and @RestController annotations in Spring Framework. @Controller vs @RestController in RESTful web services
Difference between @Controller and @RestController annotations in Spring Framework. @Controller vs @RestController in RESTful web services
Both @controller and @RestController annotations indicate that the annotated class is a “Controller” in the MVC. @Controller has been part of the Spring framework for a very long time. It is typically used in combination with @RequestMapping and @GetMapping annotations on request handler methods in a controller class. Also, to make it a RESTful web service, you need to use the @ResponseBodyannota…
View On WordPress












