ClassPathXmlApplicationContext无法加载XML
2015-06-12 09:00
387 查看
原因:ClassPathXmlApplicationContext 只能加载classes下的XML文件
解决方法:把存在XML的文件夹加入到 classpath or resources
链接参见:http://stackoverflow.com/questions/3765998/add-a-properties-file-to-intellijs-classpath
方法一:设置pom
方法二:在IDE里设置
我因为写在test里了,所以设置的Test Sources
解决方法:把存在XML的文件夹加入到 classpath or resources
链接参见:http://stackoverflow.com/questions/3765998/add-a-properties-file-to-intellijs-classpath
方法一:设置pom
<build> ... <resources> <resource> <directory>src/main/resources</directory> </resource> </resources> ... </build>
方法二:在IDE里设置
我因为写在test里了,所以设置的Test Sources
相关文章推荐
- cocos2d-x 设置屏幕方向 横屏 || 竖屏
- Unity3d 如何动态加载非Assets路径下的图片
- 手机APP UI设计尺寸基础知识
- Android Proguard 详解(转)
- Android开发之ListView、GridView 实例
- ios 打包ipa步骤
- Visual Studio 2013 community 安装
- 开发Android 自启动程序
- cocos2dx命令行编译打包安卓apk ndk_root not defined
- Android ListView的优化
- cocos2d-x CCScrollView和CCTableView的使用
- android Hander 定时器的应用
- 编译打包安卓apk报错:软件包 org.cocos2dx.lib 不存在
- android 中应用SQLite 常用自增ID,ID归零方法
- 反编译Android APK
- Property Finder – a Cross-Platform Xamarin MonoTouch Mobile App
- iOS 9整理
- Android权限大全
- 芒果iOS开发零基础教程之上传AppStore流程
- Android实时获取电量