<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.srpingframework.org/dtd/spring-beans.dtd"> <beans> <bean id="HelloWorld" class="com.gc.action.HelloWorld"> <property name="msg"> <list> <value> gf </value> <value> gd </value> </list> </property> </bean> </beans>
2.set以下
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.srpingframework.org/dtd/spring-beans.dtd"> <beans> <bean id="HelloWorld" class="com.gc.action.HelloWorld"> <property name="msg"> <set> <value> gf </value> <value> gd </value> </set> </property> </bean> </beans>
3.map以下<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.srpingframework.org/dtd/spring-beans.dtd"> <beans> <bean id="HelloWorld" class="com.gc.action.HelloWorld"> <property name="msg"> <map> <entry key="gf"> <value>HelloWorld</value> </entry> <entry key="gd"> <value>HelloWorld2</value> </entry> </map> </property> </bean> </beans>
4.properties:<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.srpingframework.org/dtd/spring-beans.dtd"> <beans> <bean id="HelloWorld" class="com.gc.action.HelloWorld"> <property name="msg"> <props> <prop key="gf">HelloWorld</prop> <prop key="gd">HelloWorld2</prop> </props> </property> </bean> </beans>