How to XML configure Spring bean for constructor injection when bean has varargs constructor
since args
is an array of String
you can use <list>
:
<bean name="myBean" class="MyClass">
<constructor-arg>
<list>
<value>111</value>
<value>222</value>
<value>333</value>
<value>444</value>
</list>
</constructor-arg>
</bean>