1、
web.xml中classpath是什么含义:classpath就是代表 /WEB-INF /classes/ 这个路径
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
classpath:applicationContext.xml 可以用 /WEB-INF /classes/ applicationContext.xml 代替
注意:classpath:只会到你的class路径中查找找文件
2、contextConfigLocation:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
在web.xml中通过contextConfigLocation配置spring,contextConfigLocation 参数定义了要装入的 Spring 配置文件
在web.xml里给该Listener指定要加载的xml
如果想装入多个配置文件,可以在 <param-value>
标记中用逗号作分隔符