I have a factory bean that produces List. But I call this factory multiple times meaning I end up with a lot of beans of type List.
I have another bean that has a property of type List. Somehow I need to put all the List beans in to one single list and provide it as a property using Spring XML.
How do I do this?
<bean id="usefulBean" class="...">
<property name="listProperty" ref="listX1AndX2AndX3AndSoOn">
</bean>
<bean id="listX1" factory-bean="anInstanceFactory" factory-method="create">
...
</bean>
<bean id="listX2" factory-bean="anInstanceFactory" factory-method="create">
...
</bean>
<bean id="listX3" factory-bean="anInstanceFactory" factory-method="create">
...
</bean>