其他分享
首页 > 其他分享> > 【踩坑】 class path resource [**.xml] cannot be opened because it does not exist

【踩坑】 class path resource [**.xml] cannot be opened because it does not exist

作者:互联网

今天在配置spring整合web项目的时候遇到如下错误
Caused by: java.io.FileNotFoundException: class path resource [applicationContext.xml] cannot be opened because it does not exist

按照教程的中,配置好监听器文件位置之后放在src下也能读取,但我的却报了如上错误,找不到配置文件。
<context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:applicationContext.xml</param-value> </context-param>**
后来把路径加个*就可以了
在这里插入图片描述

标签:xml,applicationContext,because,resource,opened,does,exist
来源: https://blog.csdn.net/weixin_44140423/article/details/99714645