Hi all,
I am currently using a singleton component, which depends on a Set<Child> components like so:
There are many Child-derived classes (About 20), and I am letting spring bring all of them automatically at the moment.Code:@Component class MyComp { @Autowired public void setChildren(Set<Child> children) { this.children = children; } }
However, I am considering making all Child classes non-singletons. According to:
http://static.springsource.org/sprin...thod-injection
I am supposed to call beanFactory.getBean for each any every one of the Child-derived classes... Is there a better way to do it, so I don't need to explicitly reference Child-derived classes in the MyComp class?
thanks.


Reply With Quote
