我的 Spring 应用程序找不到我的 applicationContext.xml 文件

问题描述 投票:0回答:0

我试过将 xml 文件放在任何地方,它可以放在我的 src 文件夹中,但无论我把它放在哪里,它都会返回此错误。

Caused by: java.io.FileNotFoundException: class path resource [applicationContext.xml] cannot be opened because it does not exist

以下是该项目中文件夹的当前结构。我已将 xml 文件放在 src 文件夹中的任何位置,但无济于事。

这是我第一次使用 Spring,我很确定我犯了一个我看不到的愚蠢错误。任何帮助都会非常受欢迎,谢谢。

当我运行 HelloSpringApp 类时,它应该运行该应用程序。

我在 IntelliJ Ultimate 中运行它。

spring spring-boot classpath filenotfoundexception file-not-found
© www.soinside.com 2019 - 2024. All rights reserved.