Spring Boot - Inversion of Control and Dependency Injection
Why does the following code cause a NullPointerException at runtime?
@Component
public class OrderService {
private PaymentService paymentService;
public void process() {
paymentService.pay();
}
}