Dependency injection
When we talk about the Spring Framework here, the first thing we need to mention is dependency injection. This is a useful feature that is required in everyday development. Every developer tries to create classes that are as independent as possible. Developers try to create a system where classes are not aware of each other, that is—they are loosely coupled. Dependency injection helps developers in wiring those classes together and, at the same time, keeping them independent.
How do we achieve this?
In modern software development, dependency injection is a technique where object A provides the dependencies for another object, object B. So, the dependency is this provided object. Injection represents a dependency providing ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access