adspace
What is difference between @controller and @restcontroller in spring boot? : Spring Boot
Answer Posted / Kaushlendra Pratap Singh
@Controller is a component that handles requests for any type of application, not just RESTful web services. It supports multiple types of responses (HTML, JSON, XML, etc.). On the other hand, @RestController is a specialization of @Controller designed specifically for handling RESTful web services. It only generates JSON responses by default.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers