I’ve configured in Spring listA (see below). It would be nice to have another one that contains all values from listA and expand it.
<bean id="listA" class="java.util.ArrayList">
<constructor-arg>
<list>
<value>a</value>
<value>b</value>
<value>...</value>
<value>z</value>
</list>
</constructor-arg>
</bean>
How to rewrite in Spring such Java code?
List listB = new ArrayList(listA);
listB.add("A");
...
listB.add("Z");
You can use collection merging: