The Spring/IoC container is at the core of the Spring Framework. It is responsible to instantiate, wire them together, configure them, and manage their complete lifecycle from creation till destruction.
The spring container uses dependency injection (DI) to manage the components that make up an application. The IoC container gets informations from the XML file and works accordingly.
Major tasks performed by IoC container:
To instantiate the application class
To configure the object
To assemble the dependencies between the objects
Different type of IoC containers:
The XmlBeanFactory is the implementation class for the BeanFactory interface.
The constructor of XmlBeanFactory class receives the Resource object so we need to pass the resource object to create the object of BeanFactory.
The ClassPathXmlApplicationContext class is the implementation class of ApplicationContext interface.