<bean class=“org.springframework.beans.factory.config.PropertyPlaceholderConfigurer“>
       <property name=“locations“>
              <value>classpath:xxx.properties</value>
       </property>
</bean>

或者

<context:Property-Placeholderlocation=”classpath:xxx.properties”/>

接下来就可以在Bean或者XML用{xxx}的方式调用了

相关文章: