<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>/WEB-INF/config/jdbc.properties</value>
</list>
</property>
</bean>
在web中,Spring会根据Context的运行环境决定去哪里加载资源。
如果是Application程序,则使用类似ClassPathXmlApplicationContext这样的Context,Spring则会使用ClassPathSource来代表资源。将会在程序运行时的ClassPath中寻找资源。但要注意一点。Spring目前能找到的资源是在FileSystem中的。而不能找到Jar包里面的资源,就算你的资源的确在ClassPath当中。
http://www.blogjava.net/DLevin/archive/2012/12/01/392337.html
http://sishuok.com/forum/blogPost/list/2458.html
http://www.cnblogs.com/shipengzhi/articles/3029867.html