Spring配置文件解析--集合注入方法

时间:2021-11-08 04:51:06
<bean id="moreComplexObject" class="example.ComplexObject">
<property name="adminEmails">
<props>
<prop key="administrator">administrator@example.org</prop>
</props>
</property> <property name="someList">
<list>
<value>a list</value>
<ref bean="myDataSource" />
</list>
</property> <property name="someMap">
<map>
<entry key="1" value="INDIA"/>
<ref bean="myDataSource" />
</map>
</property> <property name="someSet">
<set>
<value>just some string</value>
<ref bean="myDataSource" />
</set>
</property>
</bean>