top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

Spring: How can we inject Java Collection in Spring?

+1 vote
71 views
Spring: How can we inject Java Collection in Spring?
posted Feb 9, 2015 by Kali Mishra

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Spring offers four types of collection configuration elements which are as follows:

list: This helps in wiring i.e. injecting a list of values, allowing duplicates.

set: This helps in wiring a set of values but without any duplicates.

map: This can be used to inject a collection of name-value pairs where name and value can be of any type.

props: This can be used to inject a collection of name-value pairs where the name and value are both Strings.

answer Feb 9, 2015 by Amit Kumar Pandey
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...