Following quiz provides Multiple Choice Questions (MCQs) related to Spring Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.
Q 1 - Which of the statement is not correct?
All of the above statements are correct.
Q 2 - Which are the IoC containers in Spring?
BeanFactory, ApplicationContext classes acts as IoC containers in Spring.
Q 3 - What is session scope?
session scope instructs Spring IoC container to create a instance per HTTP session.
Q 4 - How do you turn on annotation wiring?
Add <context:annotation-config/> to bean configuration to turn on annotation wiring.
Q 5 - What is true about @Autowired annotation?
@Autowired annotation provides more fine-grained control over where and how autowiring should be accomplished.
Q 6 - What are the different points where weaving can be applied?
Weaving can be applied at Compile time, load Time and Run time.
Q 7 - How to use ref keyword in beans.xml?
ref is used to reference already defined bean and it can be used using both setter method and constructor argument.
Q 8 - What stands true for spring framework?
Spring framework is a light weight framework.
Q 9 - How to handle shut down of IoC container?
Using registerShutdownHook() method, shut down of IoC container can be handled. Other methods do not exists.
Q 10 - What BeanPostProcessor does?
BeanPostProcessor defines callback methods that you can implement to provide your own instantiation logic, dependency-resolution logic etc.