Show List

Quiz - Spring - 2

53%

Public Average Score
Select the right answer for below questions:

What is the use of the @Repository annotation in Spring Framework?
The @Repository annotation is used for defining a class as a view in a Spring application
The @Repository annotation is used for defining a class as a repository in a Spring application
The @Repository annotation is used for defining a class as a database connection in a Spring application
None of the above
The @Repository annotation is used for defining a class as a repository in a Spring application

What is the use of the JdbcTemplate class in Spring Framework?
The JdbcTemplate class is used for defining a class as a view in a Spring application
The JdbcTemplate class is used for defining a class as a database connection in a Spring application
The JdbcTemplate class is used for executing SQL statements and returning results in a Spring application
None of the above
The JdbcTemplate class is used for executing SQL statements and returning results in a Spring application

What is the use of the HibernateTemplate class in Spring Framework?
The HibernateTemplate class is used for executing Hibernate queries and returning results in a Spring application
The HibernateTemplate class is used for defining a class as a view in a Spring application
The HibernateTemplate class is used for defining a class as a database connection in a Spring application
None of the above
The HibernateTemplate class is used for executing Hibernate queries and returning results in a Spring application

What is the use of the Transaction Management in Spring Framework?
The Transaction Management is used for managing transactions in a Spring application
The Transaction Management is used for defining a class as a view in a Spring application
The Transaction Management is used for defining a class as a database connection in a Spring application
None of the above
The Transaction Management is used for managing transactions in a Spring application

What is the core component of Spring framework?
Spring MVC
Spring Security
Spring Data
Spring Core
Spring Core

What is the main function of the DispatcherServlet in Spring MVC?
Manages the view layer.
Provides security to the application.
Persists data to the database.
Handles requests and dispatches them to the appropriate controllers.
Handles requests and dispatches them to the appropriate controllers.

What is a Spring Bean?
A class annotated with @Controller in Spring MVC.
A class annotated with @Service in Spring.
An instance of a class created and managed by the Spring IoC container.
An interface that defines a service in Spring.
An instance of a class created and managed by the Spring IoC container.

What is the role of the ApplicationContext in Spring?
Manages the life cycle of beans.
Provides a way to access the beans from the IoC container.
Handles requests and dispatches them to the appropriate controllers.
Both a and b.
Both a and b.

What is the use of the @Autowired annotation in Spring?
To mark a class as a Spring bean.
To inject dependencies into a bean.
To define a bean in the Spring configuration file.
To mark a method as a request handler in Spring MVC.
To inject dependencies into a bean.

What is AOP in Spring?
A programming paradigm that allows separating business logic from system services.
A mechanism to dynamically add interceptors to the target object.
A way to add cross-cutting concerns such as transaction management to the application.
A tool for testing Spring applications.
A way to add cross-cutting concerns such as transaction management to the application.

Submit
Retry
{"qz1-418253":"The @Repository annotation is used for defining a class as a repository in a Spring application","qz1-418254":"The JdbcTemplate class is used for executing SQL statements and returning results in a Spring application","qz1-418255":"The HibernateTemplate class is used for executing Hibernate queries and returning results in a Spring application","qz1-418256":"The Transaction Management is used for managing transactions in a Spring application","qz1-418257":"Spring Core","qz1-418258":"Handles requests and dispatches them to the appropriate controllers.","qz1-418259":"An instance of a class created and managed by the Spring IoC container.","qz1-418260":"Both a and b.","qz1-418261":"To inject dependencies into a bean.","qz1-418262":"A way to add cross-cutting concerns such as transaction management to the application."}

    Leave a Comment


  • captcha text