intermediateDI & IoC Internals155 of 469

What happens if you do not use @Autowired in Spring? How do you perform constructor injection without it?

Tests whether you know Spring 4.3+ implicitly autowires a class's single constructor without needing @Autowired at all, and that the annotation only becomes mandatory once there's more than one candidate constructor.

Ready to master this question?

Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.

Sign in to generate a response

Next Step

← Back to all Spring Boot & Microservices questions