Compose @Autowired with @Qualifier [SPR-14060] #18632
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: declined
A suggestion or change that we don't feel we should currently apply
type: enhancement
A general enhancement
Sam Brannen opened SPR-14060 and commented
Overview
Once #18630 is resolved it will be possible to compose
@Autowired
with@Qualifier
.Consequently, the following common combination of
@Autowired
and@Qualifier
:... can be replaced with:
Although this may not appear immediately beneficial for DI for fields or setter methods, it becomes much more appealing once
@Autowired
can be applied to parameters (see #18629).For example, Spring's testing support for JUnit 5 would then be able to support parameter injection succinctly in test methods as follows.
Proposal
Implement
@Autowired
as follows.Issue Links:
@Autowired
to be declared on parametersThe text was updated successfully, but these errors were encountered: