第一種:
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list><value>classpath:config.properties</value></list>
</property>
</bean>
第二種:
<context:property-placeholder location="classpath:config.properties"/>