1、背景:Spring配置文件需要通过context:property-placeholder
标签或者PropertyPlaceholderConfigurer
类来引入classpath路径下的properties文件,示例如下:
<context:property-placeholder location="classpath:jdbc.properties" />
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations" value="classpath:jdbc.properties"<