Understanding Dependency Injection
In this chapter, we will learn what dependency injection (DI) is and how we can use it with the Spring Boot framework. The Spring Boot framework provides DI; therefore, it is good to understand the basics. DI allows for loose coupling between components, making your code more flexible, maintainable, and testable.
In this chapter, we will look into the following:
- Introducing dependency injection
- Using dependency injection in Spring Boot