报错解决:Reason: Failed to determine a suitable driver class
背景:
导入别人的项目,却报错:
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-05-06 23:35:15.267 ERROR 12944 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : ***************************
APPLICATION FAILED TO START
***************************Description:Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.Reason: Failed to determine a suitable driver classAction:Consider the following:If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).Process finished with exit code 1
这是一个常见的问题,如果试了很多都不行,可能是这个原因,以下是没解决前截图:
注意看:
1、 resources
其实只是一个普通的文件夹而已
2、配置文件里, spring.datasource.url
是灰色的,而 spring.datasource.password
却是有颜色的
解决步骤:右击 resources
文件夹,然后选择 Mark Directory as
,然后选择 Resources Root
即可:
修改好之后:
这样就不会报错了!
其他参考文章:
https://blog.csdn.net/ht_kasi/article/details/82259860?spm=1001.2101.3001.6661.1&utm_medium=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-82259860-blog-118083303.pc_relevant_antiscanv2&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-82259860-blog-118083303.pc_relevant_antiscanv2&utm_relevant_index=1
报错解决:Reason: Failed to determine a suitable driver class相关推荐
- IDEA报错 Failed to determine a suitable driver class
文章目录 现象 解决 接触标志resources目录 重新标志resources目录 现象 在做项目的过程中,需要区分几套环境,一般SpringBoot项目的配置文件也会进行分离,如下: applic ...
- springcloud解决运行出现Failed to determine a suitable driver class
找了一下午的大坑,终于被解决了!!!! 首先项目之前一直都是好好地,然后突然有个模块启动报错,错误如下: Caused by: org.springframework.beans.factory.Be ...
- spring boot测试方法报Failed to determine a suitable driver class的解决办法
时间:2022年2月2日 项目:spring boot整合mybatis-plus 错误类型:Failed to determine a suitable driver class 错误原因:pom. ...
- 完美解决Failed to determine a suitable driver class的问题
文章目录 1. 复现问题 2. 分析问题 3. 解决问题 4. 总结问题 1. 复现问题 今天在启动项目时,遇到如下问题: *************************** APPLICATIO ...
- Java DataSourceBeanCreationException: Failed to determine a suitable driver class问题解决
问题描述: org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationExcepti ...
- 【Java异常】Failed to determine a suitable driver class
本文目录 一.问题描述 二.问题原因 三.解决方案 方式1:配置文件排除 方式2:项目启动类排除 技术栈:Spring boot (2.1.5 RELEASE) + Mybatis plus(3.3. ...
- Reason: Failed to determine a suitable driver class
问题 报错信息如下: Failed to configure a DataSource: 'url' attribute is not specified and no embedded dataso ...
- 若依微服务版在Windows上通过jar包运行业务模块时提示:Failed to determine s suitable driver class
场景 若依微服务版后台服务通过jar包部署到Windows服务器: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/10962333 ...
- Springboot 抛出Failed to determine a suitable driver class异常原因
Springboot 抛出Failed to determine a suitable driver class异常原因 参考文章: (1)Springboot 抛出Failed to determi ...
最新文章
- C# 如何创建Excel多级分组
- android jks sha1,Android 获取签名文件jks的SHA1值或者SHA256的值
- 在2020年到来之前,你应该知道的10大科技趋势预测
- linux下利用openssl来实现证书的颁发(详细步骤)--转载和修改
- Photoshop 融合属性 Unity Shader
- 【随笔】“阴面”和“阳面”
- Qt学习笔记-----信号槽
- [BUUCTF-pwn]——ciscn_2019_n_8
- Windows 7 上安装 Mapnik
- mysql datetime最小值_MySQL的5种时间类型的比较
- 高等数学下-赵立军-北京大学出版社-题解-练习9.2
- 阿里云心选-T+财务软件助力线下实体的创富转型之道
- 时间序列趋势分解 seasonal_decompose
- Jeff Dean的传奇人生:超级工程师们拯救谷歌
- 第一次发博客,随便说说
- linux 改成utc时间_linux – 如何将时区设置为UTC-8
- 音乐播放器 android 回放增益,每日佳软:安卓强悍音乐播放器之PowerAMP
- 股市一跌再跌,是在提醒我们什么?
- thinkPHP6报错:Failed to listen on 0.0.0.0:8000 (reason: һַȨ“
- NVIDIA NCCL 源码学习(四)- 建图过程