app.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-3.0.xsd">
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="classpath:application.properties">
</property>
<property name="fileEncoding" value="utf-8" />
</bean>
<bean id="parent" abstract="true">
<property name="list">
<list>
<value>1</value>
<value>1</value>
<value>2</value>
</list>
</property>
<property name="set">
<set>
<value>2</value>
<value>3</value>
<value>4</value>
</set>
</property>
<property name="properties">
<props>
<prop key="propk1">propvv1</prop>
<prop key="propk3">propvv3</prop>
</props>
</property>
<property name="map">
<map>
<entry key="mapk1" value="mapvv1"></entry>
<entry key="mapk3" value="mapvv3"></entry>
</map>
</property>
</bean>
<bean id="helloBean"
class="com.finshope.bean.properties.HelloBean" parent="parent">
<!-- String[] -->
<property name="arrayOfString2" value="1,2,3,4"></property>
<property name="arrayOfString">
<array>
<value>1</value>
</array>
</property>
<!-- List<List<String>> -->
<property name="listOfListOfString">
<list>
<list></list>
</list>
</property>
<!-- java.util.Properties -->
<property name="properties">
<props merge="true">
<prop key="propk1">propv1</prop>
<prop key="propk2">propv2</prop>
</props>
</property>
<!-- java.util.List -->
<property name="list">
<list merge="true">
<list>
<value>2</value>
</list>
<value>1</value>
<ref bean="someBean2" />
<null></null>
<idref bean="someBean2" />
</list>
</property>
<!-- java.util.Map -->
<property name="map">
<map merge="true">
<entry key="mapk1" value="mapv1"></entry>
<entry key="mapk2" value-ref="someBean2"></entry>
</map>
</property>
<!-- java.util.Set -->
<property name="set">
<set merge="true">
<value>plain value</value>
<value>set2</value>
<value>set2</value>
<ref bean="someBean2"></ref>
</set>
</property>
</bean>
</beans>