web.xml中的classpath是啥
在web.xml中一个很面熟的字:classpath,它到底是个啥?
<servlet>
<servlet-name>dispatcherServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:resource/spring-mvc.xml</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>dispatcherServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
首先
classpath是指 WEB-INF文件夹下的classes目录
其次据说
classpath:只会到你指定的class路径中查找文件;
classpath*:不仅包含class路径,还包括jar文件中(class路径)进行查找.
声明:内容个人整理所得,本人不为以上言论付任何责任,因为我自己看啊
web.xml中的classpath是啥的更多相关文章
- web.xml中配置classpath:和classpath*:的区别和意思
首先 classpath是指 WEB-INF文件夹下的classes目录 解释classes含义: 1.存放各种资源配置文件 eg.init.properties log4j.properties s ...
- 在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 ...
- web.xml中classpath 解释
经过我在对 web.xml 的配置测试: web.xml 中classpath 所指的路径是项目工程路径下的 classes 文件夹
- web.xml中classpath*:与classpath:的区别
classpath对应src目录,该目录下的文件会在编译后被存放到WEB-INF文件夹下的classes目录. classpath:只会到你的class路径中查找配置文件,对于多个同名的配置文件,只会 ...
- Spring MVC-从零开始-web.xml中classpath和classpath* 有什么区别
web.xml中classpath和classpath* 有什么区别?classpath:只会到你的class路径中查找找文件;classpath*:不仅包含class路径,还包括jar文件中(cla ...
- web.xml中的contextConfigLocation在spring中的作用
在web.xml中通过contextConfigLocation配置spring, contextConfigLocation参数定义了要装入的 Spring 配置文件.默认会去/WEB-INF/下加 ...
- JavaEE web.xml 中ContextLoaderListener的解析
ContextLoaderListener监听器的作用就是启动Web容器时,自动装配ApplicationContext的配置信息.因为它实现了ServletContextListener这个接口,在 ...
随机推荐
- 华为学习配置笔记-01 配置con密码
1.配置con密码, <Huawei>system //进入系统视图 [Huawei]user-interface console 0 //进入con接口 [Huawei ...
- Java连载78-深入自动拆装箱、Date类和SimpleDateFormat格式化
一.深入自动拆装箱 1.直接举例: public class D78_AutomaticUnpackingAndPacking{ public static void main(String[] ar ...
- mysql学习指令
mysql 用户管理和权限设置 参考文章:http://www.cnblogs.com/fslnet/p/3143344.html Mysql命令大全 参考文章: http://www.cnblogs ...
- 算法设计与分析 - 李春葆 - 第二版 - pdf->word v1
章─概论 练习题 . 下列关于算法的说法中正确的有( ).Ⅰ.求解某一类问题的算法是唯一的 Ⅱ.算法必须在有限步操作之后停止 Ⅲ.算法的每一步操作必须是明确的,不能有歧义或含义模糊Ⅳ.算法执行后一定产 ...
- 解决Missing artifact com.microsoft.sqlserver:sqljdbc4:jar:4.0问题
当我们项目中用到的数据库为sql server时 我们一般在maven项目的pom.xml只添加依赖: <dependency> <groupId>com.micros ...
- 如何查看python的notebook文件.ipynb
文章中的ipython notebook和jupyter notebook基本可以互换,不过使用ipython notebook会警告您要使用jupyter notebook.其他没有区别. ---- ...
- 等级保护2.0-oracle
- 吴裕雄--天生自然HADOOP操作实验学习笔记:hadoop框架认识以及基本操作
实验目的 了解Hadoop的概念和原理 学习HDFS架构原理 熟悉mapreduce框架 熟悉mapred和yarn命令 实验原理 1.hadoop和hadoop生态系统 hadoop的思想来源是Go ...
- 第2章 PLC1200 与HMI (TP900) 组合仿真连接 编写1200程序,编写HMI 仿真过程拍摄视频
博途V13 与 WINCC PROFESSIONAL V13 创建一个PLC工程 和屏幕的 练习. 在做S1200与 HMI的仿真之前 需要设置控制面板 设置PG/PC口 巡视窗口用于看设备的一些属性 ...
- Javascript调用本地数据库
window.location.href = urls; // 本窗口打开下载 window.open(urls, '_blank'); // 新开窗口下载 (1)new ActiveXObject( ...