**[zhangkaitao](https://jira.spring.io/secure/ViewProfile.jspa?name=zhangkaitao)** opened **[SPR-11269](https://jira.spring.io/browse/SPR-11269?redirect=false)** and commented cdi support like ``` @Produces List<Conference> availableConfs; ``` see http://my.oschina.net/hantsy/blog/186939 because spring implement array/collection/map inject use find Component bean then add to array/collection/map。Can simple modify DefaultListableBeanFactory to support。please see 864 line: https://github.com/zhangkaitao/spring4-showcase/blob/master/spring4-others/src/test/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java 1、find like List\<BeanInterface> bean; 2、find BeanInterface bean,add to List; 3、others; example: https://github.com/zhangkaitao/spring4-showcase/blob/master/spring4-others/src/test/java/com/sishuok/spring4/genericinject/GenericInjectTest.java only support java config way,if want support xml,need modify bean definition(add ResolvableType else collection class) --- **Affects:** 4.0 GA **Issue Links:** - #12570 Allow for normal bean wiring semantics for types assignable to Map (_**"duplicates"**_) - #16794 `@Autowired` does not work for target bean of type Collection (_**"duplicates"**_) - #18162 Cannot inject List<String> even using `@Named` (_**"duplicates"**_)
zhangkaitao opened SPR-11269 and commented
cdi support like
see http://my.oschina.net/hantsy/blog/186939
because spring implement array/collection/map inject use find Component bean then add to array/collection/map。Can simple modify DefaultListableBeanFactory to support。please see 864 line:
https://github.com/zhangkaitao/spring4-showcase/blob/master/spring4-others/src/test/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java
1、find like List<BeanInterface> bean;
2、find BeanInterface bean,add to List;
3、others;
example:
https://github.com/zhangkaitao/spring4-showcase/blob/master/spring4-others/src/test/java/com/sishuok/spring4/genericinject/GenericInjectTest.java
only support java config way,if want support xml,need modify bean definition(add ResolvableType else collection class)
Affects: 4.0 GA
Issue Links:
@Autowireddoes not work for target bean of type Collection ("duplicates")@Named("duplicates")