These Spring Framework multiple-choice questions and their answers will help you strengthen your grip on the subject of Spring Framework. You can prepare for an upcoming exam or job interview with these Spring Framework MCQs.
So scroll down and start answering.
A. http:
B. classpath:
C. file:
D. All of these
A. MVC
B. Open-closed principle
C. Mock objects
D. DAOs
A. TRUE
B. False
A. singleton
B. session
C. instance
D. request
A. setProperty(String message)
B. setName(String message)
C. setMessage(String message)
D. setValue(String message)
A. as the JDBC provider
B. as a bean
C. as the logging framework
A. No
B. Yes
A. Regular Statement
B. Callable Statement
C. Interim Statement
D. Prepared Statement
A. @RequestHeader
B. @Header
C. @HttpHeader
A. View represents the data to the user in the desired format, supports interactions with users.
B. Model represents the business data as well as the "state" of the application
C. MVC stands for Model, View, and Controller
D. The controller's main responsibility is to interact with the database like performing CRUD operations.
A. more bean scopes are supported
B. additional lifecycle methods were added
C. more annotations are supported
A. inversion of control
B. aspect-oriented programming
C. pointcut
D. templates
A. Security
B. Web MVC
C. Web
D. DAO
A. YES
B. NO
A. No
B. Yes
A. Java-based configuration
B. XML based configuration file
C. Annotation-based configuration
D. By marshalling & unmarshalling the objects
A. FALSE
B. True
A. two
B. as many as you want
C. only one
A. True
B. FALSE
A. Setter injection
B. Constructor injection
C. Interface injection
A. delegate to a proxy
B. use init-method or @PostConstructor
C. write a custom Handler
A. Compile time
B. Load time
C. Run time
D. All of these
A. That doesn't exist
B. Supporting multi-part HTTP requests
C. Reading files from disk
D. Saving files to disk
A. No
B. Yes
A. True
B. FALSE
A. Hibernate Module
B. Webex module
C. JDBC abstraction and DAO module
A. Programmatic transaction management
B. Both of these
C. Declarative transaction management
A. Aspect oriented programming
B. None of these
C. Abstract oriented programming
D. Advanced oriented programming
A. No
B. Yes
A. How to create a bean
B. All of these
C. Bean's lifecycle details
D. Bean's dependencies
A. Spring ignored mocks.
B. They are an important part of using Spring in tests.
C. Spring and mocks do not go together well.
A. Along with @RunWith, starting and stopping a Spring context properly while running JUnit tests
B. Configuring the Maven Surefire plugin
C. configuring TestNG
A. XML configuration file
B. Java
C. JSON
A. Java-based configuration
B. Annotation-based configuration
C. XML based configuration file
D. All of these
A. None of these
B. Constructor Injection (e.g. Pico container, Spring etc): Dependencies are provided as constructor parameters.
C. All of these
D. Setter Injection (e.g. Spring): Dependencies are assigned through JavaBeans properties (ex: setter methods).
E. Interface Injection (e.g. Avalon): Injection is done through an interface.
A. All
B. OJB
C. Java Data Objects(JDO)
D. iBatis
E. TopLink
A. LDAP
B. All
C. Form-based authentication
D. HTTP BASIC authentication headers
E. HTTP Digest authentication headers
A. FALSE
B. True
A. FALSE
B. True
A. The form action url must match the "login-processing-url" attribute of <form-login> element in security.xml file
B. The method of the login form must be POST
C. The name of the username input must corresponds to the values of username-parameter attribute of <form-login> element in security.xml file
D. All of these
A. consuming a web service
B. avoiding a cross-cutting concern
C. publishing objects in a web service
D. connecting the different beans (components) of an application
A. Isolation
B. Atomicity
C. Consistency
D. All of these
A. The @ContextConfiguration annotation defines the locations of your configuration files
B. The TestContext framework of Spring 3 helps simplifying switching between different test framework
C. All of these
D. The @Runwith annotation allows you to specify the testing frameworking you would like to use
A. There is no difference
B. All of these
C. Application contexts provide a means for resolving text messages, including support for i18n of those messages.
D. Application contexts can publish events to beans that are registered as listeners.
E. Application contexts provide a generic way to load file resources, such as images.
A. MODIFY
B. GET
C. PUT
D. POST
A. Singleton (default)
B. All of these
C. Web (session, request)
D. Prototype
A. All of these
B. Classload Time
C. Compile Time
D. Runtime
A. isolation levels
B. rollback rules
C. All of these
D. propagation behavior
A. All of these
B. autodetect
C. byname, byType
D. constructor
A. WebServlet
B. SpringServlet
C. IoCServlet
D. DispatcherServlet