主要通过spring的资源文件处理类:PropertyPlaceholderConfigurer
<bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:conf/jdbc.properties</value>
<value>classpath:conf/systemConfig.properties</value>
... ...
</list>
</property>
</bean>
xml中用的时候通过${key}来使用,如遇到特殊场景,需要对值进行处理的,也可自定义类,该类继承PropertyPlaceholderConfigurer类即可,主要重写convertProperty(String propertyName, String propertyValue)方法