samedi 21 février 2015

Comma Separated List From Properties File As Constructor Argument in Spring Bean

I am trying to use below spring injection for list of strings.



<bean name="myBean" class="java.util.HashSet">
<constructor-arg type="java.util.Collection" value="#{'${my.list.of.strings}'.split(',')}"/>
</bean>


I am getting String "'${my.list.of.strings}'.split(',')" as constructor argument instead of List of Strings.


Is there any Version Issue ? I am using Spring Release 2.5 , spring-beans 2.0.xsd


Please help.


Aucun commentaire:

Enregistrer un commentaire