原文:http://blog.csdn.net/gaofuqi/article/details/46417259
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <list> <value>file:D:/workspace/test/conf/jdbc.properties</value> </list> </property> </bean>
使用"file:"可以配置绝对路径,这样spring可以加载非类路径以外的资源文件;