spring bean 读取外部properties文件
方法一:利用org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
<bean id="propertyConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:test.properties</value>
</list>
</property>
<property name="fileEncoding" value="UTF-8"/>
</bean>
方法二:利用context:property-placeholder
<context:property-placeholder location="classpath:test.properties" file-encoding="utf-8"/>