Understanding the application of IoC containers
The Spring Framework’s backbone is the IoC container that is responsible for a bean’s life cycle. In the Spring world, a Java object can be a bean if it is instantiated, assembled, and managed by the IoC container. You create a great number of beans, or objects, for your application. A bean may have dependencies that require other objects to work. The IoC container is responsible for injecting the object’s dependencies when it creates that bean. In the Spring context, IoC is also known as DI.
Note
You can refer to the Spring documentation (https://docs.spring.io/spring-framework/docs/current/reference/html/) for more information about the Spring Framework.
The Spring Framework’s IoC container core is defined in two packages: org.springframework.beans
and org.springframework.context
.
BeanFactory (org.springframework.beans.factory.BeanFactory
) and ApplicationContext (org.springframework.context.ApplicationContext...