在学习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. mysql重新设置列的自增初始值

    alter table xxx auto_increment = 100; 因为设置了列的自增之后,若删除过一些行,下次再新增时还会从已删除的id算起自增,为了让数据看起来连续,可以重新设置自增起始值 ...

  2. 【python】第二模块 步骤一 第二课、数据库表的相关操作

    第二课.数据库表的相关操作 一.课程介绍 1.1 课程介绍 学习目标 管理逻辑库和数据表 创建.删除.修改逻辑库和数据表 了解常用的数据类型和约束 字符串.整数.浮点数.精确数字.日期.枚举.主要约束 ...

  3. SQL五十题记录 1-2

    前言: 创建以下四张表:①:课程表 ②:成绩表 ③:学生表 ④:教师表 1.查询课程编号为""01""的课程比"02"的课程成绩高的所有学生 ...

  4. 关于VScode里TS文件内引入插件没有提示内置属性和方法这件事

    前几天使用VScode + Vue + Vite + Ts开发项目 由于自己手残 把VScode设置文件的代码做了一些修改 导致TS文件引入的插件没有提示了!! 几经折腾下 终于靠自己解决了! 不多说 ...

  5. find命令排除指定目录搜寻文件

    Find 命令在指定路径中搜索筛选文件,并排除非期望目录. 第一种: 语法: find <path> [-path <path> -prune -o] [...] 中括号是可选 ...

  6. kettle连接mysql报Communications link failure

    添加2个命名参数 1.autoReconnect=true 2.useSSL=false

  7. c# datagridview列宽自适应设置

  8. 【帆吖】Java学习零基础22

    Java数组

  9. MSVC设置版本

    MSVC设置版本 在开发QT时,由于QT 5.12与MSVC 2017兼容,因此需要用MSVC 2017来编译使用QT 5.12的程序. 1 安装MSVC 2017 由于笔者电脑上安装的Visual ...

  10. git操作回顾,从零入手

    1.可在极狐或者git上直接通过http克隆项目,或者通过ssh密钥,这样就不用每次上传代码需要输入密码和验证 ssh密钥参考如下 (80条消息) git如何生成ssh密钥 git生成配置ssh密钥k ...