mirror of
https://github.com/Estom/notes.git
synced 2026-02-11 06:15:45 +08:00
55 lines
1.7 KiB
XML
55 lines
1.7 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
|
|
<bean id="student" class="com.ykl.collectiontype.Student">
|
|
<property name="courses" >
|
|
<array>
|
|
<value>java</value>
|
|
<value>c</value>
|
|
</array>
|
|
</property>
|
|
|
|
<property name="list" >
|
|
<list>
|
|
<value>zhangsan</value>
|
|
<value>xiaosan</value>
|
|
</list>
|
|
</property>
|
|
|
|
<property name="maps">
|
|
<map>
|
|
<entry key="java" value="java"></entry>
|
|
<entry key="name" value="hel"></entry>
|
|
</map>
|
|
</property>
|
|
|
|
<property name="sets">
|
|
<set>
|
|
<value>msyql</value>
|
|
<value>redis</value>
|
|
</set>
|
|
</property>
|
|
|
|
<property name="courseList">
|
|
<list>
|
|
<ref bean="course1"></ref>
|
|
<ref bean="course2"></ref>
|
|
<ref bean="course3"></ref>
|
|
</list>
|
|
</property>
|
|
</bean>
|
|
|
|
<!-- 创建多个course对象-->
|
|
<bean id="course1" class="com.ykl.collectiontype.Course">
|
|
<property name="cname" value="c1"></property>
|
|
</bean>
|
|
<bean id="course2" class="com.ykl.collectiontype.Course">
|
|
<property name="cname" value="c2"></property>
|
|
</bean>
|
|
<bean id="course3" class="com.ykl.collectiontype.Course">
|
|
<property name="cname" value="c3"></property>
|
|
</bean>
|
|
</beans>
|
|
|