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(
I think this is because Spring interprets the autowiring of a collection as "give me all beans of type String
", rather than "give me the bean which is a collection of String
". The error message supports that idea.
I don't think you can use autowiring for this. Short of manually wiring it up in the XML, the best I can suggest is:
public class Foo {
private @Resource Set bar;
}