classpath 和 classpath* 区别:
classpath:只会到你指定的class路径中查找找文件;
classpath*:不仅包含class路径,还包括jar文件中(class路径)进行查找. 举个简单的例子,在我的web.xml中是这么定义的:classpath*:META-INF/spring/application-context.xml
那么在META-INF/spring这个文件夹底下的所有application-context.xml都会被加载到上下文中,这些包括META-INF/spring文件夹底下的 application-context.xml,META-INF/spring的子文件夹的application-context.xml以及jar中的application-context.xml。 如果我在web.xml中定义的是:classpath:META-INF/spring/application-context.xml
那么只有META-INF/spring底下的application-context.xml会被加载到上下文中。
相关文章
- C++有符号和无符号变量在使用过程中的区别(sign and unsign)
- 使用框架时,在web.xml中配置servlet时,拦截请求/和/*的区别。
- web.xml中在Servlet中获取context-param和init-param内的参数
- 在表单(input)中id和name的区别
- 如何在win10中Java中JDK的安装和path,classpath的环境配置
- 在springboot或者ssm框架或者类似的框架中VO、DTO、DO、PO的概念、区别和用处
- 在JavaScript中引用类型和值类型的区别
- java中得到classpath和当前类的绝对路径的一些方法(路径中的%20"进行替换空格)
- 在Eclipse中不显示.project和.classpath和.setting目录
- C语言中细说用typedef和用struct定义结构体的区别及其在单片机C语言开发中的应用