spring list map set
阿新 • • 發佈:2018-02-25
cto tlist some mem try call java -a OS
1 list
<!-- result in a setSomeList(java.util.List) call -->
<property name="someList">
<list>
<value>xxx</value>
<ref bean="myDataSource" />
</list>
</property>
2 set
<!-- result in setSomeSet(java.util.Set) call -->
<property name="someSet">
<set>
<value>xxx</value>
<ref bean=""/>
</set>
</property>
3 map
<!-- result in setSomeMap(java.util.Map) call -->
<property name="someMap">
<map>
<entry key="xxx" value="xxx"/>
<entry key="xxx" value-ref="xxx"/>
</map>
</property>
4 使用ArrayList?
<bean id="testList" class="java.util.ArrayList">
<constructor-arg>
<list>
<ref bean="xxx"/>
<ref bean="xxx"/>
</list>
</constructor-arg>
</bean>
spring list map set