Spring 加载类路径外的资源文件

	<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可以加载非类路径以外的资源文件;

猜你喜欢

转载自blog.csdn.net/gaofuqi/article/details/46417259