[SSM/Junit]java.io.FileNotFoundException: class path resource [spring-mybatis.xml] cannot be opened

来源:互联网 发布:finalcaption mac下载 编辑:程序博客网 时间:2024/05/16 15:24
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [spring-mybatis.xml]; nested exception is java.io.FileNotFoundException: class path resource [spring-mybatis.xml] cannot be opened because it does not exist。。。Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [jdbc.properties]; nested exception is java.io.FileNotFoundException: class path resource [jdbc.properties] cannot be opened because it does not exist

在进行JUnit4测试的时候发生了以上这样的错误,路径不对,经网上查询发现在JUnit4测试时配置文件要放在src/main/java下才能识别的到。

0 0
原创粉丝点击