Spring Interview Questions and Answers

    0 Votes

13. What is Target object?

The target object is an object which is advised by one or many aspects. It is also known as advised object.

14. What is Weaving?

The process of creating a link between aspects and objects to create an advised object is known as Weaving.

15. What are the four key strategies that Spring employs?
  • Lightweight Web development with Plain Old Java Objects(POJO).
  • Loose coupling through dependency injection.
  • Declarative programming through aspects.
  • Boilerplate code reduction through aspects and templates.
16. List the set of Spring jar files that makes up a Spring in terms of functionality?
  • Core Container
  • Data Access/Integration
  • Web
  • Aspect Oriented Programming(AOP)
  • Instrumentation
  • Test


17. What does core container consists of?

Core container consists of

  • Core
  • Beans
  • Context
  • Expression Language modules.

18. What are core and beans module?

The core and beans module are the most fundamental part of the Spring framework. It defines how beans are created, configured and managed.

19. What is the function of BeanFactory in Core and Beans module?

BeanFactory uses the Inversion of Control(IoC), which separates or takes away the application configuration and dependency specification from the application code.

20. What is context module?

The context module is built on the solid base provided by the Core and Beans modules. The context module adds support for internationalization, event propagation, resource loading and container creation.

21. What is the difference between Core and Context module in Spring?

The Core module makes Spring a container, whereas the context module makes Spring a framework.

22. What are the two types of containers in Spring?

  • BeanFactory, which provide basic support for dependency injection.
  • Application context that build on BeanFactory by providing application framework services.

23. What is the difference between Spring ApplicationContext and BeanFactory?

Even though both ApplicationContext and BeanFactory supports bean instantiation and wiring, ApplicationContext provides additional features such as Automatic BeanPostProcessor & BeanFactoryPostProcessor registration, ApplicationEvent publication etc.

24. What is the responsibility of BeanFactory class?

BeanFactory class function is to create beans and deliver it to the user when asked for.

25. What happens when ambigious beans or ambigious constructors event takes place in autowiring?

UnsatisfiedDependencyException will be thrown.

26. What are the implementing classes of BeanFactory?

  • DefaultListableBeanFactory
  • SimpleJndiBeanFactory
  • StaticListableBeanFactory
  • XmlBeanFactory
Page 2 of 5

Popular Videos


How to improve your Interview, Salary Negotiation, Communication & Presentation Skills.

Got a tip or Question?
Let us know

Related Articles

JSP Interview Questions and Answers
Servlet Interview Questions and Answers
Advanced Servlet Interview Questions and Answers
EJB Interview Questions and Answers