#autowired
Posts
-
Digging into Spring's Source 5: How @Autowired Picks the Bean to Inject — Dependency Resolution
Which bean Spring puts into an @Autowired field or constructor, how it finds that bean, and how it chooses when there are several — followed through the real source. Candidate lookup, the precedence of @Primary, @Qualifier and name matching, List and Map injection, the constructor selection rules, and what happens when nothing is found, each checked by running an example.