What is dependency injection and why prefer constructor injection in Spring Boot?
Dependency Injection (DI) is a design pattern where the Spring IoC container creates and passes required collaborating beans into an object rather than letting the object instantiate them itself; constructor injection guarantees immutability, required invariants, and clean unit testing.