解决class path resource [applicationContext.xml] cannot be opened because it does not exist
在学习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的更多相关文章
- 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 ...
- 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 ...
- 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 ...
- mybatis异常解决:class path resource [SqlMapConfig.xml] cannot be opened because it does not exist
解决方法: 缺失SqlMapConfig.xml文件.
- class path resource [config.xml] cannot be opened because it does not exist
初学Spring在用Resource rs=new ClassPathResource("applicationContext.xml");时老是遇到这个错误.后来发现用Appli ...
- 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 ...
- 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 ...
- 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 ...
- 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' ...
- 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 ...
随机推荐
- arm开发环境搭建
1.smaba 在Linux PC安装smaba sudo apt-get install samba编辑/etc/samba/smb.conf配置:[yz]path = /home/yzv ...
- css 径向渐变实现渐变小圈
效果如下图: 代码如下: .b-list .ceil .line { height: 20px; width: 100%; margin: 0 auto; background: radial-gra ...
- varchar(100)和varchar(10)的区别
mysql存储字段"abcdef",varchar(10)和varchar(100)都可以存储,且占用的磁盘存储空间是一样的,磁盘是按照实际长度存储.但,如果需要排序等内存操作,加 ...
- 【jenkins】jenkins 持续集成本地项目(win)
[项目]--->[配置]: [源码管理]= 无 [Pre Steps]:(因为是windows下,本地装有maven,直接用maven构建,又是个测试用例,就直接用mvn test) 选择win ...
- http hook
class XMLHttp { request = function(param) {} ; response = function(param) {} ; } let httpCopy = new ...
- nginx中proxy_set_header Host $host的作用
nginx配置upstream负载均衡后请求400,配置proxy_set_header Host $host成功.请问这是什么原理? proxy_set_header Host $host有什么作用 ...
- 简单了解promise
promise是什么: JavaScript中存在很多异步操作, Promise将异步操作队列化,按照期望的顺序执行,返回 符合预期的结果.可以通过链式调用多个 Promise达到我们的目的. Pro ...
- 第一次作业:https://edu.cnblogs.com/campus/qdu/DS2020/homework/11165
大家好,我是信息与计算科学一班的刘宝龙.爱好是看动漫,玩游戏,听音乐,不喜欢户外运动,是一个二次元宅男.但是喜欢交朋友,希望能与班里所有的同学建立良好的同学关系. 自己的强项是与人的交流与沟通,还有遇 ...
- IEEE会议论文投稿系统问题之一:WinEdt编译生成DVI文件的方法
问题描述:如何将tex文件正确编译为dvi文件,以正常使用IEEE投稿系统? 方法: 1.打开WinEdt中的命令行: 2.使用latex TexFileName编译tex生成aux文件和dvi文件: ...
- 6、jmeter的配置元件:参数化--CSV文件
1.参数化一些数据,就需要用到csv文件 Filename:文件位置和文件名 (和jmeter同一个目录就不需要写哪个盘 直接写文件名字就可以了) File encoding:编码 Variable ...