Autowiring a collection via the constructor with Spring
问题 I have what seems to be a simple problem, as stated in the title. Here is the kind of class I have : public class Foo { @Autowired public Foo(@Qualifier("bar") Set<String> bar) { // ... } } Which I try to run with the following spring context : <context:annotation-config /> <util:set id="bar"> <value>tata</value> <value>titi</value> <value>toto</value> </util:set> <bean id="foo" class="Foo" /> This fails to run with : No matching bean of type [java.lang.String] found for dependency