小编Rob*_*ael的帖子

java.io.FileNotFoundException:无法打开类路径资源,因为它不存在

我正在尝试为我的项目设置配置位置,但我不断收到以下错误:

java.io.FileNotFoundException:无法打开类路径资源[main/resources/app-context.xml],因为它不存在

我的项目设置如下:

在此输入图像描述

我将我的代码设置为:

ApplicationContext context = new ClassPathXmlApplicationContext(configLocation: "main/resources/app-context.xml");
Run Code Online (Sandbox Code Playgroud)

我怎样才能解决这个问题?

java spring file intellij-14

12
推荐指数
2
解决办法
8万
查看次数

标签 统计

file ×1

intellij-14 ×1

java ×1

spring ×1