对象的依赖关系-复杂类型注入
数组: Object[]
list: List
set: Set
map: Map
properties类型: Properties
<bean name="person5" class="com.Spring.pojo.Person"> <property name="name" value="小俞"></property> <property name="age" value="18"></property> <property name="car" ref="car"></property> <property name="cars" > <array> <value>自行车</value> <value>ofo</value> <ref bean="car" /> </array> </property> <property name="list" > <list> <value>小于</value> <value>小红</value> </list> </property> <property name="set" > <list> <value>set1</value> <value>set2</value> </list> </property> <property name="map" > <map> <entry key="username" value="root" ></entry> <entry key="car" value-ref="car" ></entry> <entry key-ref="person1" value-ref="car" ></entry> </map> </property> <property name="properties"> <props> <prop key="username">root</prop> <prop key="password">1123456</prop> </props> </property> </bean>