@Autowired vs. @Resource [SPR-5579] #10250
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
Paul Bacsik opened SPR-5579 and commented
@Autowired
public void setDataSource(DataSource ds) does not wire when default-autowire="true" and there exists more DataSource beans e.g with ids dataSource, someOtherDS1, someOtherDS2.Declaring
@Resource
public void setDataSource(DataSource ds) works.It seams
@Autowired
can't resolve the PropertyName, maybe ist searches the parameter name 'ds', but since this is a Property Setter, this is not the desired behaviour.Affects: 2.5.6
Issue Links:
@Qualifier
The text was updated successfully, but these errors were encountered: