在学习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. 元素定位xpath路径中添加参数的方法

    在某次自动化测试中,需要定位下拉列表(非select列表)中不同的元素,我想到了利用参入参数的方式来实现,经过多次尝试,得到如下方法,与大家分享 例如在通过text定位某个元素时,self.find_ ...

  2. javase我的笔记

    学习java编程 |--需要遵循其语法规范 |--在其开发环境下编程 准备开发java环境 |--安装jdk |--配置jdk jdk:含义是java提供的一套开发工具,包含jre\编译器等 |--编 ...

  3. 解决 vue init webpack 报错问题 报错原因是因为不能执行脚本文件。

    解决方案: 运行下面一行代码: set-ExecutionPolicy RemoteSigned 

  4. PLC入门笔记11

    1.开关? 输入 拨杆开关.点动开关.常开.常闭开关 霍尔接近开关(磁场 N极导通 3线+-DC24V ).电容接近开关(非金属).电感接近开关(金属) 2.输入接线? NPN型,不需要外接电源,直接 ...

  5. springboot项目记录3用户注册界面

    九.注册-前端页面 1.在register页面中编写发送请求的方法,采用点击事件来完成.选中对应的按钮(JQuery下的)(( " 选 择 器 " ) ) , 选 中 某 一 个 ...

  6. PR2022(Premiere Pro 2022)Mac/win最新中文版

    Adobe Premiere Pro 2022 Mac/win是用于专业级别的视频编辑软件,一个基于时间轴的视频处理工具,具有许多用于生成高端视频的不同功能.Adobe Premiere Pro最重要 ...

  7. 基础实验之access/trunk/valn/vlanif/静态路由

     实验要求 1,PC1,PC2,PC3,PC4分别属于VLAN10,20,30,40 2,PC1,PC2,PC3,PC4互通 步骤1:PC1,2,3,4分别配置IP,并在SW6,SW7分别配置网关,并 ...

  8. 12.15linux学习第十八天

    今天老刘讲了如同天书一般的隐藏章节,第23章使用OpenLDAP部署目录服务,难度太高了.第16章使用Squid部署代理缓存服务 章节概述: 本章首先介绍代理服务的原理以及作用,然后介绍Squid服务 ...

  9. 2003031126-石升福-Python数据分析-五一假期作业

    项目 内容 班级链接 20级数据班(本) 作业链接 五一假期作业 博客名称 2003031126-石升福-Python数据分析-五一假期作业 要求 每道题要有题目,代码(使用插入代码,不会插入代码的自 ...

  10. STL练习-看病要排队

    题目http://acm.hdu.edu.cn/showproblem.php?pid=1873   看病要排队这个是地球人都知道的常识. 不过经过细心的0068的观察,他发现了医院里排队还是有讲究的 ...