web.xml加载spring的配置文件:类 org.springframework.web.context.support.ServletContextResource
<!--类路径 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:baobaotao-dao.xml,classpath:baobaotao-service.xml</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<!-- context 路径-->
<context-param><param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml,/WEB-INF/applicationContext_1.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!--
DispatcherServlet
Spring MVC 的核心类
-->
<servlet>
<servlet-name>baobaotao</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<load-on-startup>3</load-on-startup>
<!-- Servlet 和URL映射的关系
把本来web.xml中工作放到其他地方来做
对于VIEW层次进行多模块开发 (contextConfigLocation)
用这种方式可以加载所有的配置文件!!!
-->
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/servlet-config/baobaotao-servlet-test01.xml,/WEB-INF/servlet-config/baobaotao-servlet-test02.xml</param-value>
</init-param>
<!--
Servlet 和URL映射的关系
把本来web.xml中工作放到其他地方来做
真实路径:\WEB-INF\servlet-config\baobaotao-servlet-test.xml
根据namespace
<init-param>
<param-name>namespace</param-name>
<param-value>servlet-config/baobaotao-servlet-test</param-value>
</init-param>
-->
</servlet>
分享到:
相关推荐
华为数据中心认证 HCIE-DC LAB实验考试配置1-v2 华为数据中心认证 HCIE-DC LAB实验考试配置1-v2
sqlserver数据库SSH配置1
IPTV配置规范(用户数据配置1)[定义].pdf
1. 一般用户配置模式:提示符:“ >” 在此模式下,能使用的命令较少,无法对交换机进行配置。 2. 特权用户配置模式:提示符:“ #” 在一般用户模式下,使用命令“ enable” 进入特权用户模式。在此模式下,用户...
动态数据源配置1
CentOS 非root服务器配置1
1.2.maven多模块项目配置1
h3c路由器上设置E1的详细配置信息,并对E1的相关配置信息进行了详细的解释,比如配置的E1模式等等
2-k8部署之环境配置1
PROBOT Anno机械臂ikfast运动学求解器配置1
jenkins 相关配置 1
ecif报文配置1
SpringBoot Web配置1
代理服务器配置1
dockerWIN安装配置1
交换机基本配置1
jedisPool配置1
h3c路由器GRE配置1.pdf
H3C安全配置指导-IP_Source_Guard配置1.pdf
这是我自己制作的关于ensp防火墙的基本配置文件