Monday, November 27, 2006

Sring 1.1 and map element

Sring 1.1 and map element

In Spring 1.1 the map element has a key and value like this

<map>
<entry key="event">
<value>ss</value>
<ref>ref1</ref>
</entry>
</map>

In the above code there is no way to specify the "key" as an object, it must be a "String" object !

However from spring 1.2x onwards we can do do this

<map>
<entry>
<key-ref>ref1</key-ref>
<value-ref>ref2</value-ref>
</entry>
<map>

In many cases the above is what one would need of a java map.

0 Comments:

Post a Comment

<< Home