- Spring allows us to inject collections using 3 tags
<list/>
,<set/>
,<map/>
tags. - Spring provides
<list/>
to inject List inside array. - The
list
tag is used inside<property/>
and<constructor-arg/>
tags. - The
list
tag hasvalue
which is nested in listtag
.
`
<property name="...">
<list>
<value>...</value>
<value>...</value>
<value>...</value>
</list>
</property>
`
`
<property name="...">
<list>
<bean class="..." id="...">
<property name="..." value="..." />
<property name="..." value="..." />
<property name="..." value="..." />
</bean>
</list>
</property>
`
`
<property name="...">
<list>
<ref bean="..."/>
</list>
</property>
`