posted 13 years ago
Hi All,
I am new to spring. I am facing a problem and don't know how to tackle it.
Here is the issue:
I have a spring application context file - spring-application-context-XXX.xml
And i have a bean named,say "aBean" defined like dis :
<bean id="aBean" class="com.some.package.SomeClass" >
Now, I need to pass a list of ref-beans to this bean via setter injection.
The ref-beans have to be presented in some other spring application context file (say, spring-application-context-YYY.xml, which will be included in spring-application-context-XXX.xml via <import resource=""/>.
The number of beans should be dynamic (i.e they can be 3 or 4 or any in number).
Is there any way we can achieve this?
Thanks in advance for suggestions!