11th
Jun
Spring MCQ

Spring MCQ

  • Admin
  • 11th Jun, 2022
  • 304 Followers

Take Spring MCQ Quiz & Online Test to Test Your Knowledge 

We have listed below the best Spring MCQ Questions, that check your basic knowledge of Spring. This Spring MCQ Test contains 25 multiple-choice questions. You have to select the right answer to every question to check your final preparation. apart from this, You can also download below the Spring MCQ Pdf completely free.

Spring MCQ Quiz

1) Spring is licensed under

  • A. GNU
  • B.Apache License 2.0
  • C.GNU Lesser General Public License
  • D.Open source

2) Spring is developed by

  • A. Red Hat Software
  • B.Daniel Fernández
  • C.Apache
  • D.Pivotal Software

3) Which one of following is an alternative to Spring HibernateTemplate

  • A. Hibernate contextual sessions
  • B.HibernateContext
  • C.All of the mentioned
  • D.None of the mentioned

4) Which of following method is used to gracefully shutdown all the bean processes after closing the spring container?

  • A. destory method
  • B.shutdownHook
  • C.session method
  • D.None of these

5) What is the scope of bean in portlet context?

  • A. session
  • B.global-session
  • C.request
  • D.prototype
Download Free : Spring MCQ PDF

6) Can we integrate Struts with Spring?

  • A. Yes
  • B.No

7) What is the default scope of the beans?

  • A. Prototype
  • B.session
  • C.Request
  • D.Singleton

8) What is bean in Spring?

  • A. A component
  • B.An Object
  • C.A class
  • D.A container

9) How to use in spring framework?

  • A. is used with bean id
  • B. is used with string values

10) Which method is used to process bean before initialization callback

  • A. postProcessAfterInitialization()
  • B.scope
  • C.postProcessBeforeInitialization()
  • D.it's own constructor

11) Which tag is also allowed by static field?

  • A. util:constant
  • B.list
  • C.constructor-args
  • D.set

12) AOP stands for?

  • A. Asynchronous oriented programming
  • B.Aspect Oriented Programming
  • C.All Oops Program

13) Which element is used to specify access attributes for bean's methods.

  • A. security:intercept
  • B.security:protect
  • C.security:intercept-security
  • D.none of above

14) How many types of method injection are available in spring?

  • A. 4
  • B.2
  • C.8
  • D.1

15) In Spring Method that allows you to start a new transaction is called -

  • A. commit()
  • B.getTransaction()
  • C.rollback()
  • D.None of the above

16) Spring EJB Support Classes for Different Types of EJB

  • A. stateful session beans (SFSBs)
  • B.message-driven beans (MDBs)
  • C.stateless session beans (SLSBs)
  • D.AbstractStatefulSessionBean

17) Spring EJB Support Classes for Different Types of EJB

  • A. stateful session beans (SFSBs)
  • B.message-driven beans (MDBs)
  • C.stateless session beans (SLSBs)
  • D.AbstractStatefulSessionBean

18) To start the OpenEJB container, you first set environment variable

  • A. OPENEJB_HOME
  • B.Bashrc
  • C.EJB_HOME
  • D.EJB 2.x components

19) Annotation which decorates the PostageServiceBean is

  • A. @Autowire
  • B.@Interceptors
  • C.@Wire
  • D.@Mention

20) To declare a JNDI object reference in the Spring IoC container.

  • A. JndiObject
  • B.JndiObjectFactory
  • C.JndiObjectFactoryBean
  • D.JndiFactoryBean

21) What is bean scope?

  • A. Bean scope defines the accessibility of bean in a java class.
  • B.Bean scope defines the accessibility of bean in a java package
  • C.Bean scope defines the accessibility of bean in a web application.
  • D.Bean scope forces Spring to produce a new bean instance as per the scope defined.

22) Which are the ioc container in spring?

  • A. BeanFactory
  • B.ApplicationContext
  • C.Both BeanFactory & ApplicationContext
  • D.None of the above

23) Which of the following attribute is used to handle web flow requests?

  • A. servlet-flow
  • B.servlet-attr
  • C.servlet-requests
  • D.servlet-mapping

24) The Spring support classes facilitate building session beans:-

  • A. stateful session beans (SFSBs)
  • B.message-driven beans (MDBs)
  • C.stateless session beans (SLSBs)
  • D.All of the above

25) Which of the following option is used to declare a JNDI object reference in the Spring IoC container?

  • A. JndiObject
  • B.JndiFactoryBean
  • C.JndiObjectFactory
  • D.JndiObjectFactoryBean

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.

Related MCQ/Quiz

01st
Jan
Python MCQ
01st
Feb
JavaScript MCQ
01st
Jan
Java MCQ
01st
Feb
Matlab MCQ
01st
Oct
Email MCQ