web.xml中classpath*:与classpath:的区别
classpath对应src目录,该目录下的文件会在编译后被存放到WEB-INF文件夹下的classes目录。
classpath:只会到你的class路径中查找配置文件,对于多个同名的配置文件,只会加载找到的第一个文件;
classpath*:除了指定的class路径,还会到该class路径下的jar包中进行查找配置文件,对于多个同名的配置文件,都会被加载。
但是对于classpath*,无法使用模糊匹配的方式,可以通过逗号来隔开多个配置文件。
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:applicationContext.xml,
classpath*:app-1.xml,
classpath*:app-2.xml,
classpath*:app-3.xml,
classpath*:app-4.xml
</param-value>
</context-param>
参考链接:
在Web.xml中自动扫描Spring的配置文件及resource时classpath*:与classpath:的区别
web.xml中classpath*:与classpath:的区别的更多相关文章
- web.xml 中<context-param>与<init-param>的区别与作用
<context-param>的作用: web.xml的配置中<context-param>配置作用 1. 启动一个WEB项目的时候,容器(如:Tomcat)会去读它的配置文件 ...
- web.xml中:<context-param>与<init-param>的区别与作用及获取方法
<context-param>的作用: web.xml的配置中<context-param>配置作用1. 启动一个WEB项目的时候,容器(如:Tomcat)会去读它的配置文件w ...
- web.xml中的ContextLoaderListener和DispatcherServlet区别
ContextLoaderListener和DispatcherServlet都会在Web容器启动的时候加载一下bean配置. 区别在于: DispatcherServlet一般会加载MVC相关的be ...
- 关于jsp web项目,jsp页面与servlet数据不同步的解决办法(报错404、405等)即访问.jsp和访问web.xml中注册的/servlet/的区别
报错信息: Type Status Report Message HTTP method GET is not supported by this URL Description The method ...
- 在web.xml中classpath和classpath*的区别
classpath 和 classpath* 区别: classpath:只会到你指定的class路径中查找找文件; classpath*:不仅包含class路径,还包括jar文件中(class路径) ...
- web.xml中classpath:和classpath*: 有什么区别?
web.xml中classpath:和classpath*: IccBoY applicationContext.xml 配置文件的存放位置 web.xml中classpath:和classp ...
- Web.xml中自动扫描Spring的配置文件及resource时classpath*:与classpath:的区别
Web.xml中自动扫描Spring的配置文件及resource时classpath*:与classpath:的区别 一.Web.xml中自动扫描Spring的配置文件(applicationCont ...
- Spring MVC-从零开始-web.xml中classpath和classpath* 有什么区别
web.xml中classpath和classpath* 有什么区别?classpath:只会到你的class路径中查找找文件;classpath*:不仅包含class路径,还包括jar文件中(cla ...
- web.xml中classpath 解释
经过我在对 web.xml 的配置测试: web.xml 中classpath 所指的路径是项目工程路径下的 classes 文件夹
随机推荐
- 基于bootstrap_信息采集
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- 淘宝数据库OceanBase SQL编译器部分 源码阅读--生成逻辑计划
body, td { font-family: tahoma; font-size: 10pt; } 淘宝数据库OceanBase SQL编译器部分 源码阅读--生成逻辑计划 SQL编译解析三部曲分为 ...
- Codeforces Round #422 (Div. 2) C. Hacker, pack your bags! 排序,贪心
C. Hacker, pack your bags! It's well known that the best way to distract from something is to do ...
- queue_action
http://www.learn4master.com/programming-language/python/python-queue-for-multithreading
- 一个简单的servlet
1.创建一个自己的servlet文件,继承HttpServlet MyServlet.java package com.jmu.ccjoin.controller; import java.io.IO ...
- Linux内核中kzalloc函数详解
**************************************************************************************************** ...
- 转:Oracle客户端NLS_LANG参数的设置详解
原文:http://database.51cto.com/art/201107/279361.htm 我们知道,Oracle客户端语言支持可以通过NLS_LANG参数的设置来完成,不同的系统平台上NL ...
- 安装YCM出现:YouCompleteMe unavailable no module named frozendict或者 YouCompleteMe unavailable no module named future
参考博文:http://blog.sina.com.cn/s/blog_8f70642d0102wo57.html 原因就是你或者没用Vundle安装,或者Vundle由于网速太慢下载到一半不能把安装 ...
- javascript之存储数据-cookie,localStorage,sessionStorage
cookie: 存储一些简单的数据,以文本形式放到本地,大小4kb 存储:document.cookie='name=value' 取值:document.cookie(字符串) 期限:expires ...
- margin -------总结(block inline 可置换元素)
margin在块元素.内联元素中的区别 block元素(块元素)大致有:P|H1|H2|H3|H4|H5|H6|UL|OL|PRE| DL | DIV | NOSCRIPT | BLOCKQUOTE ...