http://blog.csdn.net/xing_sky/article/details/8228305

参考文章地址:

http://hi.baidu.com/huahua035/item/ac8a27a994b55bad29ce9d39

http://blog.csdn.net/lushuaiyin/article/details/6880640

http://jeiofw.blog.51cto.com/3319919/934413

classpath就是代表  /WEB-INF /classes/  这个路径(如果不理解该路径,就把一个web工程发布为war包,然后用winrar查看其包内路径就理解啦)

常用的场景:

在SSH架构中,配置Spring的上下文环境:

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

里面的

classpath:applicationContext.xml

也可以使用  /WEB-INF /classes/ applicationContext.xml  代替

注意:

classpath 和 classpath* 区别:

classpath:只会到你的class路径中查找找文件;
classpath*:不仅包含class路径,还包括jar文件中(class路径)进行查找

Spring classPath:用法的更多相关文章

  1. Java Spring AOP用法

    Java Spring AOP用法 Spring AOP Java web 环境搭建 Java web 项目搭建 Java Spring IOC用法 spring提供了两个核心功能,一个是IoC(控制 ...

  2. Java Spring IOC用法

    Java Spring IOC用法 Spring IoC 在前两篇文章中,我们讲了java web环境搭建 和 java web项目搭建,现在看下spring ioc在java中的运用,开发工具为In ...

  3. Spring JdbcTemplate用法整理

    Spring JdbcTemplate用法整理: xml: <?xml version="1.0" encoding="UTF-8"?> <b ...

  4. spring RestTemplate用法详解

    spring RestTemplate用法详解 spring 3.2.3 框架参考有说明 21.9 Accessing RESTful services on the Client

  5. spring classpath & classpath*

    classpath-找到系统类路径下的第一个匹配的配置文件 classpath*-找到系统类路径下的所有符合要求的配置文件 参考资料:http://www.micmiu.com/j2ee/spring ...

  6. Spring Aspect 用法略讲

    『配置Aspect』 若要启用AspectJ风格的注解则必须额外的导入AspectJ的jar包,此外还需要在spring的配置文件中进行配置,配置方式有两种; 一.在配置文件的Schema中进行配置 ...

  7. (转载)spring RestTemplate用法详解

    前面介绍过spring的MVC结合不同的view显示不同的数据,如:结合json的view显示json.结合xml的view显示xml文档.那么这些数据除了在WebBrowser中用JavaScrip ...

  8. spring@PropertySource用法

    测试例子 package com.hjzgg.auth.config; import org.springframework.beans.factory.annotation.Autowired; i ...

  9. Spring @Value 用法小结,#与$的区别

    20161016更新:这货其实是SpEL的功能,来这里看看吧: Spring 4 官方文档学习(五)核心技术之SpEL 起因 一直的用法是 @Value("${jdbc.driverClas ...

随机推荐

  1. PAT (Advanced Level) 1074. Reversing Linked List (25)

    简单题. #include<cstdio> #include<cstring> #include<cmath> #include<vector> #in ...

  2. 阿里笔试js题

    有一个数组,其中保存的都是小写英文字符串,现在要把它按照除了第一个字母外的字符的字典顺序(字典顺序就是按首字母从a-z顺序排列,如果首字母相同则按第二个字母……)排序,请编写代码: 例:[" ...

  3. appium通过WiFi连接真机进行测试

    http://www.th7.cn/Program/Android/201507/514602.shtml appium通过WiFi连接真机进行测试   2015-07-24 19:43:07CSDN ...

  4. Cannot call sendError() after the response has been committed - baiyangliu - 博客频道 - CSDN.NET

    body{ font-family: "Microsoft YaHei UI","Microsoft YaHei",SimSun,"Segoe UI& ...

  5. Mysql安装脚本

    Mysql PS:要先看懂脚本在复制粘贴运行脚本,每个人的环境不一样 #/bin/bash #--------变量 #num=` + ` now_lujing=`pwd` #------------- ...

  6. iOS 数字每隔3位添加一个逗号的

    +(NSString *)countNumAndChangeformat:(NSString *)num { ; long long int a = num.longLongValue; ) { co ...

  7. LPC1788定时器使用

    #ifndef __TIM_H_ #define __TIM_H_ #include "common.h" extern u8 tim1_mr0_flag; void tim0_c ...

  8. FZU 2101 大三的美好时光

    DP+离散化. 首先需要把时间离散化,剩下的就是简单DP. 还要判断哪些选修课与必修课时间有重合,我用了前缀和来处理. 注意:这题时间端点也不能重合. #include<cstdio> # ...

  9. iOS开发——Scheme白名单

    问题:在iOS 9下涉及到平台客户端跳转,系统会自动到项目info.plist下检测是否设置平台Scheme.对于需要配置的平台,如果没有配置,就无法正常跳转平台客户端. 报错:This app is ...

  10. iOS开发 调用系统相机和相册

    调用系统相机和相册 (iPad,iPhone)打开相机:(iPad,iPhone)//先设定sourceType为相机,然后判断相机是否可用(ipod)没相机,不可用将sourceType设定为相片库 ...