在学习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. 导出接口 生成doc文档

    public function test1(){ echo ' <html xmlns:o="urn:schemas-microsoft-com:office:office" ...

  2. Webpack解析与讲解

    一.什么是Webpack? 一个基于node.js的前端模块化/预处理/扁平化处理器. 二.为什么要使用Webpack? 解决业务代码中的各种依赖,模块加载,静态文件引入问题(重复依赖/强依赖,阻塞加 ...

  3. varchar(100)和varchar(10)的区别

    mysql存储字段"abcdef",varchar(10)和varchar(100)都可以存储,且占用的磁盘存储空间是一样的,磁盘是按照实际长度存储.但,如果需要排序等内存操作,加 ...

  4. 理解Node.js中的流(译)

    前言 本文部分译自by: Liz Parody in Node.js, 2019.11.23,英文良好的同学建议阅读原版. Node.js中的流是众所周知的难理解,而且更加难用.按照Dominic T ...

  5. C# core 最简单的方式写入日志

    System.IO.StreamWriter sw = System.IO.File.AppendText( LogPath + LogFielPrefix + "Error-" ...

  6. 使用SharpCompress压缩文件后把压缩的文件流传给前端

    1 SharpCompress版本 0.30.1 2 应用场景:前端传递某个标识符,如Id,查询和该Id相关联的文件,并把文件压缩,最后返回给前端.适用于压缩多个体积较小的文件,如果文件体系过大,可能 ...

  7. js 数组对象中每一项对象属性比较大小与计算数组对象属性和

    // 数组对象排序方法   export function compare(property) {       return function (a, b) {         const value ...

  8. 实验一Linux系统与应用准备

    实验一Linux系统与应用准备 |这个作业属于哪个课程|内容| | ---- | ---- | ---- | |这个作业属于哪个课程|2021春季Linux系统与应用 (南昌航空大学 - 信息工程学院 ...

  9. openvas在centos中扫描单项的python实现

    使用gvm_cli命令来实现 先创建一个空的配置 copy_id = '085569ce-73ed-11df-83c3-002264764cea' new_config = ''' <creat ...

  10. .NET 6 的 docker 镜像可以有多小

    https://blog.csdn.net/sD7O95O/article/details/120135032 Docker Image Size - How to Keep It Small? ht ...