What is @controller and @restcontroller?
Answer / Preeti Rani
@Controller is a Spring MVC annotation that marks a class as a controller. @RestController is a specialization of @Controller that produces response bodies with HTTP messages and automatically selects the appropriate Content-Type based on the method annotated with @RequestMapping.
| Is This Answer Correct ? | 0 Yes | 0 No |
How to handle exceptions in the spring mvc framework?
What is the purpose of contextloaderlistener in spring?
What is stateful bean in spring?
What is the difference between @component and @controller?
What are the important beans lifecycle methods?
What is dao and dto in spring?
What’s the difference between @component, @repository & @service annotations in spring?
How do you teach annotations?
What are the autowiring modes in spring?
What is spring language?
What are the ways by which configuration metadata can be provided to the spring container?
Is jdk an api?