创建spring的IOC容器时[ApplicationContext.xml] cannot be opened because it does not exist
来源:互联网 发布:网络修复工具 编辑:程序博客网 时间:2024/05/11 01:36
class path resource [ApplicationContext.xml] cannot be opened because it does not exist
在学习spring的过程中,启动项目一直报错,原因在于包的缺失,解决了包的问题之后,又出现了上面这一段提示错误。根据前人们的帖子,原来在创建spring的IOC容器的时候使用了如下语句:ApplicationContext ctx = new ClassPathXmlApplicationContext("ApplicationContext.xml");
对于applicationcontext的使用,有路径这一说·········开始配置的时候对应的xml文件放在了src之外,却没有在new的时候告诉它具体的路径,所以报错。具体的使用方法还待后期研究,至于目前这个错误的解决办法就是将对应的xml文件移动到src目录下就OK!
0 0
- 创建spring的IOC容器时[ApplicationContext.xml] cannot be opened because it does not exist
- applicationContext.xml cannot be opened because it does not exist
- 关于applicationContext.xml cannot be opened because it does not exist的解决
- 关于applicationContext.xml cannot be opened because it does not exist的解决
- 关于applicationContext.xml cannot be opened because it does not exist的解决
- 关于applicationContext.xml cannot be opened because it does not exist的解决
- 关于applicationContext.xml cannot be opened because it does not exist的解决
- [applicationContext.xml] cannot be opened because it does not exist错误
- 关于class path resource [applicationContext.xml] cannot be opened because it does not exist
- class path resource [applicationContext.xml] cannot be opened because it does not exist
- class path resource [applicationContext.xml] cannot be opened because it does not exist
- class path resource [spring.xml] cannot be opened because it does not exist
- Spring问题:class path resource [xxx.xml] cannot be opened because it does not exist
- class path resource [spring-mvc.xml] cannot be opened because it does not exist
- cannot be opened because it does not exist
- IDEA中Spring配置错误:class path resource [.xml] cannot be opened because it does not exist
- Spring问题:class path resource [org.spring/applicationContext.xml] cannot be opened because it does no
- webservice [META-INF/xfire/services.xml] cannot be opened because it does not exist
- Ubuntu14.04(32bit)配置YouCompleteMe
- duilib中的V和H布局中滚动条问题
- 双缓冲\GDI保存位图
- WIN2008中部署网站后样式及JS加载不了
- Android线程与进程(一)进程和线程简介、进程的生命周期
- 创建spring的IOC容器时[ApplicationContext.xml] cannot be opened because it does not exist
- while and for Loops--Learning Python-Chapter 13
- MPI多进程并行计算矩阵乘法实现
- HDU 2040 亲和数
- centos6.6中service启动gearman服务
- 字节&字符&二进制
- 用struts2实现下载功能时,浏览器取消下载时后台出现的异常
- poj 1141 Brackets Sequence(区间DP+路径打印)
- 第12周上机实践项目3——用递归方法求解(求n的阶乘)