【错误解决】[Maven] cannot be opened because it does not exist错误[文件无法编译到target目录下的解决方法]
发布日期:2021-06-29 13:38:38 浏览次数:2 分类:技术文章

本文共 310 字,大约阅读时间需要 1 分钟。

转载请注明出处:

本文源自【】

使用IDEA搭建的Maven项目,在写SpringEL和资源调用时出现了如下错误:

相信我,代码没问题的、

Caused by: java.io.FileNotFoundException: class path resource [cn/hncu/p2_2_2SpringEL/test.properties] cannot be opened because it does not exist

文件无法找到,后来在csdn论坛提问后才知道。

因为IDEA有个配置项,默认只把.class的文件放到编译目录中,也就是target目录。

后来我去看了target目录下,确实没有那文件。

转载地址:https://chenhx.blog.csdn.net/article/details/53155760 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:【Spring】Spring常用配置-Spring EL和资源调用
下一篇:【Spring】Spring常用配置-Bean的Scope

发表评论

最新留言

逛到本站,mark一下
[***.202.152.39]2024年04月25日 11时49分57秒