<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/classes/applicationContext-hibernate.xml,
/WEB-INF/classes/applicationContext-service.xml,
/WEB-INF/applicationContext-acegi-security.xml
/WEB-INF/classes/applicationContext-pjtz.xml,
</param-value>
</context-param>

<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>

在web应用的配置文件web.xml中常常会见到这样的一段代码,其实它是指定spring配置文件的

如果载入多个配置文件,在param-value里以逗号分隔,如果缺省这种配置,默认加载/WEB-INF/ applicationContext.xml文件

contextConfigLocation是参数值,固定不变

web.xml中contextConfigLocation参数的作用的更多相关文章

  1. web.xml中contextConfigLocation的作用(转)

    原文地址:http://blog.csdn.net/zhangliao613/article/details/6289114 原文格式较乱,此处略作整理.内容未变. 在web.xml中使用contex ...

  2. servlet获取并存储web.xml中context-param参数

    在web.xml中定义了context-param,一般不会随意改动,所以在监听器中做一次处理,容器启动时读取并存储在Properties中,方便以后取值. SysProperties 类用于存储 c ...

  3. 使用ServletContext实现数据共享和获得web.xml中的参数

    //适用于:很多文件需要初始化参数时,例如数据库账号和密码,不可能使用config这个对象,因为如果使用config对象去配置的话,那么每个servlet类都必须写一个参数,这时候就必须采用conte ...

  4. web.xml中的welcome-file-list标签作用

    welcome-file-list是一个配置在web.xml中的一个欢迎页,用于当用户在url中输入项目名称或者输入web容器url(如http://localhost:8080/)时直接跳转的页面. ...

  5. web.xml中contextConfigLocation的作用

    如果在web.xml里给该Listener指定要加载的xml,如: xml代码如下: <!-- spring config --> <context-param> <pa ...

  6. web.xml中<load-on-start>n</load-on-satrt>作用

    如下面一段配置,我们再熟悉不过了: 我们注意到它里面包含了这段配置:<load-on-startup>1</load-on-startup>,那么这个配置有什么作用呢? 作用如 ...

  7. JSF web.xml的各类参数属性配置

    出处:http://www.cnblogs.com/zxpgo/articles/2570175.html 感谢作者的分享!! ———————————————————————————————————— ...

  8. (转)web.xml中的contextConfigLocation在spring中的作用

    (转)web.xml中的contextConfigLocation在spring中的作用   一.Spring如何使用多个xml配置文件 1.在web.xml中定义contextConfigLocat ...

  9. web.xml中的contextConfigLocation在spring中的作用

    在web.xml中通过contextConfigLocation配置spring, contextConfigLocation参数定义了要装入的 Spring 配置文件.默认会去/WEB-INF/下加 ...

随机推荐

  1. ora-28056错误解决

    问题描述:今天有同事找我,说是oracle数据库的监听器出现问题,我连接服务器查看后,发现不是监听器问题,而是进程连接数已经达到150个了,客户端连接不上服务器,因其是测试服务器,重启服务器后再次sq ...

  2. 亿级别G级别文本数据去重

    亿级别G级别文本数据去重 文件总行数 字节数 去重后行数 [root@d mongoexport]# wc -l superpub-ask-question.csv126530681 superpub ...

  3. spring boot web服务

    [root@d java]# tree -I target .├── pom.xml└── src ├── main │   ├── java │   │   └── com │   │   └── ...

  4. 【css a标签 鼠标悬浮时变手型】

    <a href="#" style="cursor:pointer">

  5. 约会安排---hdu4553(线段树,麻烦的区间覆盖)

      题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4553 算是poj3667的加强版,建立两颗线段树,一个是DS区间,另一个是NS区间.那么根据题意, ...

  6. Key Set---hud5363(快速幂)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5363 #include <iostream> #include <cstdlib&g ...

  7. Kubernetes实战(二):k8s v1.11.1 prometheus traefik组件安装及集群测试

    1.traefik traefik:HTTP层路由,官网:http://traefik.cn/,文档:https://docs.traefik.io/user-guide/kubernetes/ 功能 ...

  8. Most efficient way to get the last element of a stream

    Do a reduction that simply returns the current value: Stream<T> stream; T last = stream.reduce ...

  9. Mysql EXPLAIN 相关疑问: Using temporary ; Using filesort

    一.什么是Using temporary ; Using filesort 1. using filesort filesort主要用于查询数据结果集的排序操作,首先MySQL会使用sort_buff ...

  10. tools-eclipse-001-如何安装插件

    插件的安装方法大体有以下三种: 第一种:直接复制法: 假设你的Eclipse的在(C:\eclipse), 解压你下载的 eclipse 插件或者安装eclipse 插件到指定目录AA(c:\AA)文 ...