Spring Boot app: Failed to determine a suitable driver class
创始人
2024-12-26 04:10:36
0

目录

    • 问题描述
    • 解决方案

问题描述

我尝试连接springboot;当我运行时,出现错误“Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded datasource could be configured."”

application.yml 应用程序.yml

datasource:     druid:       driver-class-name: com.mysql.cj.jdbc.driver       url: jdbc:mysql://localhost:3306/dbName       username: root       password: ********(pass) 

Output 输出

*************************** 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 class   Action:  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). 

解决方案

删除application.yml中的druid

datasource:       driver-class-name: com.mysql.cj.jdbc.driver       url: jdbc:mysql://localhost:3306/dbName       username: root       password: ********(pass) 

相关内容

热门资讯

透视肯定!aapoker插件,... 透视肯定!aapoker插件,aapoker辅助器怎么用,系统教程(有挂教程);1.aapoker辅...
透视教程!aapoker透视怎... 透视教程!aapoker透视怎么用,aapoker怎么拿好牌,2025新版(有挂详情);1、玩家可以...
透视透视挂!aapoker脚本... 透视透视挂!aapoker脚本,aapoker免费透视脚本,2025版教程(有挂辅助);1、aapo...
透视游戏!aapoker辅助器... 透视游戏!aapoker辅助器是真的吗,aapoker辅助器怎么用,安装教程(有挂规律)1、进入游戏...
透视黑科技!aapoker怎么... 透视黑科技!aapoker怎么拿好牌,aa poker透视软件,解说技巧(有挂解密)1)aapoke...
透视计算!aapoker透视方... 透视计算!aapoker透视方法,aapoker插件下载,高科技教程(有挂揭秘);aapoker透视...
透视数据!aapoker怎么选... 透视数据!aapoker怎么选牌,aapoker怎么拿好牌,详细教程(有挂介绍);1、该软件可以轻松...
透视代打!aapoker ai... 透视代打!aapoker ai插件,aapoker怎么设置提高好牌几率,力荐教程(有挂插件)1、aa...
透视数据!aapoker插件下... 透视数据!aapoker插件下载,aa poker透视软件,AI教程(有挂黑科技)aa poker透...
透视app!aapoker透视... 透视app!aapoker透视方法,aapoker脚本,玩家教你(有挂方法);1、下载好aapoke...