Back Forum Reply New

Map with placeholders in Spring context file

In a Spring context file is it possible to configure the values in a map using placeholders? What I want to achieve is something like this:

lt;mapgt; lt;entry key=quot;0quot; value=quot;${value.0}quot; /gt; lt;entry key=quot;1quot; value=quot;${value.1}quot; /gt; lt;entry key=quot;2quot; value=quot;${value.2}quot; /gt;
lt;/mapgt;

then in a referenced properties file define

value.0=123
value.1=234
value.2=345

Or should I use value-ref=quot;some-beanquot; and then put the placeholder in the name attribute of some-bean?
¥
Back Forum Reply New