What is difference between @controller and @restcontroller?



What is difference between @controller and @restcontroller?..

Answer / Virender Kumar Tiwari

@Controller is a basic controller that supports both RESTful and non-RESTful requests. @RestController, however, is specifically for handling RESTful web services by combining the functionality of @Controller and @ResponseBody.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Spring Framework Interview Questions

How does @transactional work in spring?

1 Answers  


What are the different types of ioc container?

1 Answers  


What is the use of beanfactory in spring?

1 Answers  


When singleton beans are created in spring?

1 Answers  


What are three types of annotations?

1 Answers  


What is the implementation of the bean factory container?

1 Answers  


What is the difference between constructor and setter injection?

1 Answers  


What is the purpose of contextloaderlistener in spring?

1 Answers  


Explain the functions of the following annotations: @component, @controller, @repository, @service.

1 Answers  


How many types of injection method used in spring?

1 Answers  


What is the main use of spring batch framework?

1 Answers  


What are the components of spring framework?

1 Answers  


Categories