In this chapter, we will start with understanding what dependency is. We will explore the need for DI. We will understand the flexibility Dependency Injection (DI) brings in. After that, we will explore how DI is implemented in the Spring Framework.
DI is the most important feature of the Spring Framework. It makes it easy to develop loosely coupled applications. Loosely coupled applications are easier to unit test and, therefore, a lot easier to maintain.
In the Spring Framework, DI is implemented in the Spring Inversion of Control (IoC) container.
After the Spring Framework and DI became popular, Jakarta EE (earlier Java EE) introduced a standard specification for DI called the Java Contexts and Dependency ...