Use this construct:
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"> ... <util:map id="mymap" map-class="java.util.LinkedHashMap"> <entry key="a" value="b" /> <entry key="c" value="d" /> </util:map> ... </beans>
to declare a card using ordered keys. You can then use this map using <ref id="mymap" /> , or you can use this construct directly when declaring the value of the Map property.
Grzegorz grzybek
source share