Spring-collection.xml
<?xml version= "1.0" encoding= "UTF-8"?> <beans xmlns= "Http://www.springframework.org/schema/beans" Xmlns:xs
I= "Http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation= "Http://www.springframework.org/schema/beans Http://www.springframework.org/schema/beans/spring-beans.xsd "> <!--Spring Container is responsible for creating, managing, maintaining beans and being able to rely on injection into the corresponding Component--> <bean id= "Collectionbean" class= "Www.csdn.spring.collection.set.CollectionBean" scope= "singleton" lazy
-init= "Default" > <!--Set set--> <property name= "Sets" > <set> <value> Zeng Hongjun </value> <value> Army brother </value> <value> haha
</value> <value> hehe </value> <value> Hey </value>
<value> washing </value> </set> </property> <!--list collection--> <property name= "USERs "> <!--<list> <ref bean=" u1 "/> <ref bean=" U2 "/>
<ref bean= "U3"/> <ref bean= "U4"/> </list>--> <array>
<ref bean= "U1"/> <ref bean= "U2"/> <ref "bean=" U3 <ref bean= "U4"/> </array> </property> <!--map--> <property Name= "Map" > <map> <entry key= "1" value-ref= "U1" ></entry> <en Try key= "2" > <ref bean= "U2"/> </entry> <entry key= "3" Val
ue-ref= "U3" > </entry> </map> </property>
<property name= "Props" > <props> <prop key= "1" >jdbc:oracle</prop> <prop key= "2" ≫jdbc:mysql</prop> <prop key= "3" >jdbc:access</prop> </props> </ property> </bean> <bean id= "U1" class= "Www.csdn.spring.collection.set.User" > <prop Erty name= "name" value= "Deep"/> <property name= "age" value= ""/> </bean> <bea
N id= "U2" class= "Www.csdn.spring.collection.set.User" > <property name= "name" value= "Deepsoul"/> <property name= "Age" value= "></property> </bean> <bean id=" U3 "class=" www.csdn.sp Ring.collection.set.User "> <property name=" name value= "CHRP"/> <property "age" Val Ue= "/>" </bean> <bean id= "U4" class= "Www.csdn.spring.collection.set.User" > <PR
Operty name= "name" value= "Redarmy"/> <property name= "age" value= "/>" </bean> ≪/beans>