Hi,
this is surely a stupid question but I do not find its answer in the docs.
How can you define a bean which is a <list> ?
Here is my wished applicationContext :
The idea is that I have multiple beans inherited from a class having a list attribute, and that every bean uses EXACTLY the same list so, ATM, I am writing a lots of :Code:<bean id="mylist" class="????"> <value>elem0</value> <value>elem1</value> </bean> <bean id="test" class="some.class.with.a.list.attribute"> <property name="alist"><ref local="mylist" /> </property> </bean> <bean id="test2" class="some.otherclass.with.the.same.list.attribute"> <property name="alist"><ref local="mylist" /> </property> </bean>
Code:<bean id="test" class="some.class.with.a.list.attribute"> <property name="alist"> <list> <value>elem0</value> <value>elem1</value> </list> </bean> <bean id="test2" class="some.otherclass.with.the.same.list.attribute"> <property name="alist"> <list> <value>elem0</value> <value>elem1</value> </list> </bean> ...
thanks for any help,
regards,
chris


Reply With Quote