Home

markdown notes

Spring Core

table of contents


Dependency Injection

Process where objects use their dependent objects without a need to define or create them is called Dependency injection.

We can inject dependent objects in three ways, using:

Dependency Injection in Spring official doc

Null-Safety

@Service
public class EmailService {
    @Autowired
    private EmailValidator emailValidator;
}

Immutability

Design Problem - Single Responsibility

Design Problem Circular Dependencies

Testing Field Injection