?
Solved

Wiring maps and properties

Posted on 2011-05-04
3
Medium Priority
?
213 Views
Last Modified: 2012-05-11
I was reading folowing line and I did not understand clearly.

Wiring maps
You can wire java util.Map collections in Spring using the <map> element. Map
collections are somewhat different than Lists, Sets. Each entry in a Map is
made up of a key and a value defined by the <entry> element:
The value of a map <entry>, just as with <list> and <set>, can be any valid property
element.

Again, this includes <value>, <ref>, <list>, or even another <map>.
When wiring an <entry>, notice that the key attribute will also be a String.
This is a slight limitation over the full functionality of java.util.Map, which
allows any object to be the key of a map entry. However, this limitation doesn’t
often present a problem, as Maps are typically keyed with Strings anyway.
Wiring properties
A java.util.Properties collection is the final type of collection that can be wired
in Spring. It is wired with the <props> element. Each element of a properties collection
is wired with the <prop> element.
In many ways, <props> works similarly to <map>. The big difference is that the
value of a <prop> entry is always a String, so there is no need to use the..

Any ideas, resources,sample code,links, highly appreciated. thanks in advance.
0
Comment
Question by:gudii9
  • 2
3 Comments
 
LVL 92

Expert Comment

by:objects
ID: 35694851
Its just saying the key should be a String
0
 
LVL 7

Author Comment

by:gudii9
ID: 35694998
>>Its just saying the key should be a String

for Property or Map. please advise
0
 
LVL 92

Accepted Solution

by:
objects earned 2000 total points
ID: 35695008
both

for properties the value must also be a string
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses
Course of the Month13 days, 23 hours left to enroll

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question