在web.xml中通过contextConfigLocation配置spring,contextConfigLocation
参数定义了要装入的 Spring 配置文件。

如果想装入多个配置文件,可以在 <param-value>
标记中用逗号作分隔符。

如果在web.xml里指定要加载的xml,如:
xml代码如下:
<!-- spring config -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
则会去加载相应的xml,而不会去加载/WEB-INF/下的applicationContext.xml。
但是,如果没有指定的话,默认会去/WEB-INF/下加载applicationContext.xml。

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

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

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

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

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

  3. 【转】web.xml中的contextConfigLocation在spring中的作用

    一.spring中如何使用多个xml配置文件 1.在web.xml中定义contextConfigLocation参数,Spring会使用这个参数去加载所有逗号分隔的xml文件,如果没有这个参数,sp ...

  4. web.xml中通过contextConfigLocation的读取spring的配置文件

    web.xml中通过contextConfigLocation的读取spring的配置文件 博客分类: web.xml contextConfigLocationcontextparamxmlvalu ...

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

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

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

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

  7. 在web.xml中通过contextConfigLocation配置spring

    <context-param>         <param-name>contextConfigLocation</param-name>         < ...

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

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

  9. web.xml中contextConfigLocation参数的作用

    <context-param> <param-name>contextConfigLocation</param-name> <param-value> ...

随机推荐

  1. Bootstrap-全局css样式之按钮

    这里所说的按钮只是Bootstrap设计的能使标签或元素呈现按钮样式的属性,所以为 <a>.<button> 或 <input> 元素添加按钮类(button cl ...

  2. c语言学习之基础知识点介绍(六):if和switch结构

    本节主要说c语言中的分支结构. c语言中分支结构有两大类:一种是if,一种是switch. 一.if结构 //if结构,语法: //第一种: if(表达式){ //语句块 } //第二种: if(表达 ...

  3. android - DefaultHttpClient设置超时.

    Android的DefaultHttpClient中,超时设置需要调用HttpConnectionParams.setConnectionTimeout方法,如(以下代码的31~35行代码): ref ...

  4. HTML基础(2) 格式标签 文本标签

    格式标签: 1.<p></p>  用来显示段落 2.<br> 控制换行 3.<nobr> </nobr> 防止浏览器将过长内容自动换行显示 ...

  5. 浅谈.net中的params关键字

    先举个例子: 代码如下: class Program { static void Main(string[] args) { Console.WriteLine(Sum(1)); Console.Wr ...

  6. 数据库学习(整理)----6--Oracle如何快速备份和多次备份数表数据

    1.说明:  这里假设一种应用场景! 假设,银行系统中有大量的数据需要及时备份,如何才能快速高效呢! 条件需求: (1).不能设置同步锁(设置的会影响银行正常业务进行!使得银行系统处于维护状态,这是不 ...

  7. C语言带参数的main函数

    C语言带参数的main函数 #include<stdio.h> int main(int argc,char*argv[]) { int i; ;i<argc;i++) printf ...

  8. 343. Integer Break -- Avota

    问题描述: Given a positive integer n, break it into the sum of at least two positive integers and maximi ...

  9. line-height行高使用技巧

    若父元素标签高度一定,假设为150px,子元素需要垂直居中,再重新给子元素设置一个行高就好了,省事省力

  10. c++builder调用vc的dll

    $bcb/bin目录中有个implib.exe 把你的vc.dll和implib.exe复制到c盘根目录下 运行cmd 进入c盘根目录执行 c:\implib -a cb.lib vc.dll 会生成 ...