gpt4 book ai didi

java - org.springframework.beans.factory.BeanInitializationException : Could not load properties

转载 作者:行者123 更新时间:2023-12-02 06:03:04 25 4
gpt4 key购买 nike

当我尝试使用 eclipse 运行我的应用程序时,出现此错误。

 org.springframework.beans.factory.BeanInitializationException: Could not load properties

这是我在 spring-servlet.xml 中的配置

 <context:property-placeholder location="classpath:application.properties" />

我的项目文件夹结构是

src
--main
-- java
application.properties

Webcontent
--WEB-INF
--jsp
--lib

我使用 POM.xml 构建这个项目

在目标文件夹内创建war文件

如果您需要更多信息,请告诉我。

最佳答案

该文件看起来并不位于将添加到 WAR 中的任何位置。将其放在 src/main/resources 下,这是非源代码资源的常规 Maven 位置。

关于java - org.springframework.beans.factory.BeanInitializationException : Could not load properties,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22516402/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com