In this episode of the Spring series, I explain to you the concept of Dependency Injection and Inversion of Control and then show you how to do it in a Java Project.
Code: https://gitlab.com/kody-simpson/spring-framework/dependency-injection-and-inversion-of-control-without-spring
Resources:
- 0:00:00 - Intro
- 0:00:47 - What is a dependency?
- 0:02:45 - What is Dependency Injection?
- 0:05:16 - What is Inversion of Control?
- 0:06:45 - Manual Dependency Injection (without Spring framework)
- 0:09:51 - Tight coupling
- 0:11:18 - Loose coupling
- 0:14:21 - Example 1 (Constructor Injection)
- 0:17:38 - Example 2 (Using interface to support “swappability”)
- 0:23:48 - Outro
#spring-boot #java #programming