Show List
Quiz - Spring - 4
Select the right answer for below questions:
What is the use of the @EnableWebMvc annotation in Spring?
To enable the support for the Spring MVC framework.
To manage transactions in the application.
To define a bean in the Spring configuration file.
To handle exceptions in the application.
To enable the support for the Spring MVC framework.
What is the role of the @RequestBody annotation in Spring MVC?
To bind a request body to a method parameter in a controller class.
To handle exceptions in the application.
To manage transactions in the application.
To define a bean in the Spring configuration file.
To bind a request body to a method parameter in a controller class.
What is the purpose of the @ResponseBody annotation in Spring MVC?
To handle exceptions in the application.
To manage transactions in the application.
To return the response body of a method in a controller class.
To define a bean in the Spring configuration file.
To return the response body of a method in a controller class.
What is the role of the DispatcherServlet in Spring MVC?
It manages transactions in the application.
It defines a bean in the Spring configuration file.
It handles exceptions in the application.
It is the central servlet that dispatches requests to controllers.
It is the central servlet that dispatches requests to controllers.
What is the purpose of the @ControllerAdvice annotation in Spring?
To define a global exception handler for the entire application.
To map HTTP requests to specific methods in a controller class.
To manage transactions in the application.
To define a bean in the Spring configuration file.
To define a global exception handler for the entire application.
What is the use of the @Async annotation in Spring?
To map a database table to a Java class.
To manage transactions in the application.
To run a method asynchronously.
To define a bean in the Spring configuration file.
To run a method asynchronously.
What is the role of the @Scheduled annotation in Spring?
To map a database table to a Java class.
To schedule a method to run at specific intervals.
To manage transactions in the application.
To define a bean in the Spring configuration file.
To schedule a method to run at specific intervals.
What is the use of the @Autowired annotation in Spring?
To inject a bean into another bean.
To map a database table to a Java class.
To manage transactions in the application.
To define a bean in the Spring configuration file.
To inject a bean into another bean.
What is the role of the @RestController annotation in Spring MVC?
To map a database table to a Java class.
To handle exceptions in the application.
To define a bean in the Spring configuration file.
To create a RESTful web service.
To create a RESTful web service.
What is the purpose of the @ExceptionHandler annotation in Spring MVC?
To create a RESTful web service.
To map a database table to a Java class.
To handle exceptions in the application.
To define a bean in the Spring configuration file.
To handle exceptions in the application.
Submit
Retry
{"qz1-688140":"To enable the support for the Spring MVC framework.","qz1-688141":"To bind a request body to a method parameter in a controller class.","qz1-688142":"To return the response body of a method in a controller class.","qz1-688143":"It is the central servlet that dispatches requests to controllers.","qz1-688144":"To define a global exception handler for the entire application.","qz1-688145":"To run a method asynchronously.","qz1-688146":"To schedule a method to run at specific intervals.","qz1-688147":"To inject a bean into another bean.","qz1-688148":"To create a RESTful web service.","qz1-688149":"To handle exceptions in the application."}
Leave a Comment