File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

configuring Maps in bean factory -> Spring

 
Arun Prasath
Ranch Hand
Posts: 80
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Buddies,

There is a difference between specifying key/value for Properties & Maps in bean factory XML file.

for example, in case of DI-ing the class which is a type of Properties, we use

<bean id="x" class="x.y">
<property name="someProperies">
<prop key="1"> one </prop>
<prop key="2"> two </prop>
</property>
</bean>

and for Maps, we use

<bean id="x" class="x.y">

<property name="someProperies">
<entry>
<key>
<value>something</value>
</key>
<value>Some value</value>
</entry>
</property>

</bean>

Why is there such difference in specifying properties, as they both are anyway belong to Map? can't we use any one for all Map types?
Could anyone answer me?

Thanks,
Arun

 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic