0 votes
2k views
in Spring by
I want to understand about IOC/DI in spring.

1 Answer

0 votes
by

IOC: IOC means Inversion Of Controll. The IOC is a container that manages java objects from instantiation to destruction through its BeanFactory. Java components are instantiated by IOC container that are called beans. The IOC container manages bean's scope, lifecycle and  AOP features, When it configured.

The IoC container enforces the dependency injection pattern for your components, leaving them loosely coupled and allowing you to code to abstractions.

The IoC container is responsible to instantiate, configure and assemble the objects. The IoC container gets informations from the XML file and works accordingly.

The IOC perform the following tasks:

  • Instantiate the application class
  • Configure the object
  • Assemble the dependencies between the objects


Types of IoC containers:

  1. BeanFactory
  2. ApplicationContext

Share:- Whatsapp Facebook Facebook


Welcome to Developerhelpway Q&A, where you can ask questions and receive answers from other members of the community.

Categories

...