I am very new to spring and started using. I have a requirement where i have something like properties like regions..US,UK
Regions
-------
US
UK
And when i read US it shud have values something like
US
----
(KEY)primary----VALUE(primaryValue)
(KEY)secondary----VALUE(secondaryValue)
. . similarly
UK
--
(KEY)primary----VALUE(primaryValue)
(KEY)secondary----VALUE(secondaryValue)
. . and the regions might increase as requirement changes and the key value pairs below it too
Someone hint me so i can proceed Thank you in advance
You need to create two bean a List and a Map, in other word List<Map> is you need
<bean id="regions" class="java.util.ArrayList">
<constructor-arg>
<list>
<ref bean="usMap" />
<ref bean="ukMap" />
</list>
</constructor-arg>
</bean>
and
<util:map id="usMap" map-class="java.util.HashMap">
<entry key="primary" value="someValue"/>
<entry key="secondary" value="someValue"/>
</util:map>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With