IOC is also known as dependency injection (DI). It is a process whereby objects define their dependencies, that is, the other objects they work with, only through constructor arguments, arguments to a factory method, or properties that are set on the object instance after it is constructed or returned from a factory method. The container then injects those dependencies when it creates the bean. This process is fundamentally the inverse, hence the name Inversion of Control (IoC), of the bean itself controlling the instantiation or location of its dependencies by using direct construction of classes.
There are two types of IoC containers. They are:-
The BeanFactory interface is the central IoC container interface in Spring. Its responsibilities include instantiating or sourcing application objects, configuring such objects, and assembling the dependencies between these objects. IOC is the core principle which Spring uses for Separation of concern concept . No matter what you use - Spring MVC, Security , Core , DAO integrations , you will be using the IOC principle.
The ApplicationContext interface also acts as the IoC container. The ApplicationContext interface is built on top of the BeanFactory interface. It adds some extra functionality than BeanFactory. So it is better to use ApplicationContext than BeanFactory.
Java Training | Python Training | Machine Learning with Python Training | Deep Learning with Python Training | Data Science with Python Training | Projects
SILAN Technology, BBSR Call to: 9439202111 | 9658317757 | 0674-2361252