ssi ssh tomcat启动时找不到spring配置文件,properties

本文介绍了解决Spring框架中因找不到DBPool.properties配置文件而导致的BeanInitializationException异常的方法。提供了创建config文件夹并将其添加到Java Build Path的具体步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundException: class path resource [DBPool.properties] cannot be opened because it does not exist

org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundException: class path resource [DBPool.properties] cannot be opened because it does not exist

java.io.FileNotFoundException: class path resource [DBPool.properties] cannot be opened because it does not exist

配置文件可以放在config文件夹中
工程上右击 New --> Source Folder,之后输入个 config 名字就可以了

如果已经有了config文件夹,可还是找不到,或者是用 New --> Folder 建 config 的话,需要这样:

在工程上右击,选 properties,java build path 选 Source 页签,点 Add Folder... 选中 config 就可以了。

黑色头发:http://heisetoufa.iteye.com/
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值