Can you create a List in a Spring application-context.xml file without using the
element?
I have a bean whose constructor takes a Col
<bean name="myBean" class="com.company.MyClass">
<constructor-arg>
<bean class="org.springframework.util.StringUtils" factory-method="commaDelimitedListToSet">
<constructor-arg type="java.lang.String" value="${the.value}"/>
</bean>
</constructor-arg>
</bean>
This works. You can use SPEL.
In the bean config,
<property name="collection" value="#{{'item1','item2','item3'}}"/>
A possible solution for your problem is to pass a single string to your constructor and then parse the list inside the constructor using String.split().
I don't believe so, but you could have a constructor that built the list from a string.
(Actually, not entirely sure I'm correct--you could probably play significant games with custom placeholder configurators, although whether or not you should is probably debatable :)