在线助手
开发工具
json校验工具
json在线格式化
网页设计工具
在线配色
在线取色器
图片制作工具
图片圆角制作
编码解码
图片工具
gif在线转视频
图片base4编码解码
加密解密
aes加密解密
计算工具
文件Hash在线计算
转换工具
数字大写转换工具
生活工具
二维码工具
彩色二维码在线制作
娱乐工具
朋友圈拆迁补偿协议生成
高考准考证图片在线制作
足迹地图在线生成
我的七夕预测
推广工具
词云标签云在线生成制作
元宵祝福在线制作
IntelliJ IDEA无法读取src下的配置文件 报错找不到 解决方案
在线助手博客首页
###Hello world!
**问题描述:如下在IntelliJ IDEA中中读取spring配置文件时报错,但是在eclipse中却正常,无报错** ```xml 信息: Loading XML bean definitions from class path resource [bean.xml] Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [bean.xml]; nested exception is java.io.FileNotFoundException: class path resource [bean.xml] cannot be opened because it does not exist at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:343) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303) at com.spring.ioc.Application.main(Application.java:25) Caused by: java.io.FileNotFoundException: class path resource [bean.xml] cannot be opened because it does not exist at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:180) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:329) ... 2 more ``` idea对这些配置的文件方式很明显和eclipse是不同的。在idea中有一个 [Content Roots](https://www.jetbrains.com/help/idea/2016.2/configuring-content-roots.html)的概念。需要为每一个folder配置相应的Content Roots。 所以需要加入如下配置即可 ```xml
/src
**/*.properties
**/*.xml
``` 完整配置如图  > 本文是 [在线助手|在线工具箱](https://www.it399.com/) 原创,**转载请注明来自 在线助手博客频道:IntelliJ IDEA无法读取src下的配置文件 报错找不到,原文链接**:https://www.it399.com/blog/web/20180409.jsp
网站快速导航
json在线格式化
阿拉伯数字转大写
彩色二维码模板
元宵节祝福制作
拆迁补偿协议
彩色二维码生成
Md5|Sha|Crc计算
Aes加密解密
图片base6编码工具
色彩搭配方案
图片取色工具
图片圆角制作工具
足迹地图生成器
词云标签云生成器
高考准考证在线制作
gif在线转视频
我的七夕预测
在线助手博客
Web后台开发
Web前端开发
Android移动开发
Python开发
linux运维开发
ffmpeg编码解码
赵丽颖冯晓峰
-
-
-
Copyright © 2017-2018 . All Rights Reserved.
粤ICP备18008506号