1.设置多个文件
2.空的applicationContext.xml
1. 设置多个文件
导入其它
web.xml中设置
2.空的applicationContext.xml
2.空的applicationContext.xml
1. 设置多个文件
导入其它
<beans>
<import resource="cache/applicationContext-ehcache.xml" />
<import resource="email/applicationContext-email.xml" />
</beans>
web.xml中设置
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:spring/*.xml</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath*:/applicationContext.xml
classpath*:/applicationContext-showcase.xml
</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:/applicationContext.xml,classpath*:/applicationContext-showcase.xml</param-value>
</context-param>
2.空的applicationContext.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<!-- <bean/> definitions here -->
</beans>