How to inject java collection in Spring:
<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.
Read more: Setter Injection with Collection Example
No comments:
Post a Comment