在学习spring的过程出现class path resource [applicationContext.xml] cannot be opened because it does not exist

一直以为是路径的原因,怎么改始终不行

最后发现是因为自己又在原项目下建子模块(Module)的原因,重建项目才得以解决

下面还有不用重建项目的解决办法:我们将  ClassPathXmlApplicationContext 换成  FileSystemXmlApplicationContext,然后复制xml文件的绝对路径即可。

解决class path resource [applicationContext.xml] cannot be opened because it does not exist的更多相关文章

  1. Spring报错:java.io.FileNotFoundException: class path resource [applicationContext.xml] cannot be opened because it does not exist

    感谢:http://blog.chinaunix.net/uid-20681545-id-184633.html提供的解决方案,非常棒 ! 问题说明: 新建一个Spring项目,新建一个Bean类:H ...

  2. nested exception is java.io.FileNotFoundException: class path resource [applicationContext.xml] cannot be opened because it does not exist

    org.apache.ibatis.exceptions.PersistenceException: ### Error building SqlSession. ### The error may ...

  3. class path resource [applicationContext.xml] cannot be opened because it does not exis

    使用maven创建web工程,将spring配置文件applicationContext.xml放在src/resource下,用eclipse编译时提示class path resource [ap ...

  4. mybatis异常解决:class path resource [SqlMapConfig.xml] cannot be opened because it does not exist

    解决方法: 缺失SqlMapConfig.xml文件.

  5. class path resource [config.xml] cannot be opened because it does not exist

    初学Spring在用Resource rs=new ClassPathResource("applicationContext.xml");时老是遇到这个错误.后来发现用Appli ...

  6. Caused by: java.io.FileNotFoundException: class path resource [applicationContext.xml] cannot be ope

    1.错误描述 java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.tes ...

  7. org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContext.xml]; nested exception is java.io.FileNotFoundException: c

    //这个是 配置文件放错了地方 org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing ...

  8. parsing XML document from class path resource [applicationtext.xml]; nested exception is java.io.FileNotFoundException: class path resource [applicationtext.xml] cannot be opened because it does not e

    控制台异常: parsing XML document from class path resource [applicationtext.xml]; nested exception is java ...

  9. aused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method fai

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'roleDaoImpl' ...

  10. Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Unable t

    spring与hibernate整合然后出现如下错误: org.springframework.beans.factory.BeanCreationException: Error creating ...

随机推荐

  1. VOIP(SIP)呼叫环境及流程试验

    宿主机:win11  IP: .1         PHONE: 102 虚拟机: v11     IP: .129     SIP SERVER 虚拟机: v10     IP: .128      ...

  2. 2003031120—廖威—Python数据分析第七周作业—MySQL的安装以及使用

    项目    内容 课程班级博客链接 https://edu.cnblogs.com/campus/pexy/20sj 这个作业要求链接  https://edu.cnblogs.com/campus/ ...

  3. excel制作表格

    我们这个表格举例: 1. 序号列自动生成序号.选中数字"1"所在的单元格,将鼠标停留在图片中标红的区域向下拖动即可                                 ...

  4. gitbash 本地文件提交为一个新的项目 到 gitlab

    此篇操作的环境: 已经配置好一个本地仓库,且可成功的将本地项目提交到gitlab上的对应的远程仓库. 这意味着此时你的电脑已经安装好git,有一个本地仓库存放你的项目,成功配置好一个对应的远程仓库,且 ...

  5. maya灯光导入houdini插件开发

    加入工作室时师兄给了两道测试题,由于第一道是完善师兄的一个houdini项目管理插件,我只是开发了一些小功能,所以不好意思拿出来. 第二道题就完全是由自己开发的一个小插件,功能是把maya里的灯光导入 ...

  6. heimaJava18_线程

    Java 线程 单线程 线程(thread)是一个程序内部的一条执行路径. main方法的执行其实就是一个单独的执行路径 程序中如果只有一条执行路径,那么这个程序就是单线程的程序 多线程 多线程是指从 ...

  7. js 遍历对象属性

    function* objectEntries(obj) { let propKeys = Reflect.ownKeys(obj); for (let propKey of propKeys) { ...

  8. promise一脸懵逼...

    // 要求:封装一个方法,能根据路径读取文件,并把内容返回 const fs=require('fs') const path=require('path') 1. 普通读取文件的方式 1 const ...

  9. 使用Kong网关API接口配置

    一.Upstream1.创建Upstream: curl -i -X POST IPAddress:8001/upstreams -d 'name=upstream-test' -d 'slots=1 ...

  10. white-space: pre-line;的坑

    html模版解析换行 这是字符串 跟标签设置white-space: pre-line: pre兼容ie8,pre-line不兼容ie 6-7 这行文字开头是没有空格的但是还是有很大的空格,代码方法截 ...