The
Inversion of Control is the process by which application defines the dependency and these dependencies are then satisfied in
runtime by the Spring Framework. The
IoC container is the main component of the Spring framework. It provides the main
IoC container and
AOP framework. The core container of the Spring Framework provides important functionality including
dependency injection and
bean life cycle management.
We can say that The
IoC or
Inversion of Control is the core features of the Spring Framework. Developers uses the
IoC container to
manage the beans and its dependency in the application. Thus simplifies the implementation of business logic in the application.
Popular Spring Tutorials
- Spring Tutorial
- Spring MVC Web Tutorial
- Spring Boot Tutorial
- Spring JDBC Tutorial
- Spring AOP Tutorial
- Spring Security Tutorial
The Spring IoC Container actually comes with two distinct containers:
1. Bean Factories
2. Application Context
Bean Factories: The
BeanFactory provides the configuration framework and basic functionality and support for
Dependency Injection.
The
org.springframework.beans.factory.BeanFactory is the actual representation of the Spring
IoC container that is responsible for containing and otherwise managing the aforementioned beans.
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.