在src下
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<!-- 可以配置多个资源文件 -->
<list>
<value>classpath:jdbc.properties</value>
<value>classpath:quartzCronExpr.properties</value>
</list>
</property>
</bean>
在src/conf/spring下
<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
<property name="configLocation">
<value>classpath:conf/spring/ehcache_config.xml</value>
</property>
</bean>
或者
<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
<property name="configLocation">
<value>/WEB-INF/classes/conf/spring/ehcache_config.xml</value>
</property>
</bean>
与applicationContext.xml在相同目录下的引用
<!-- 导入Spring配置文件 -->
<import resource="applicationContext_datasource.xml" />
<import resource="applicationContext_quartz.xml" />
<import resource="applicationContext_ehcache.xml" />
<import resource="applicationContext_email.xml"/>
web.xml 也可以参照