springboot因配置数据库依赖出现的错误

错误提示:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-02-08 16:36:26.058 ERROR 2212 --- [ 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 class

 

 主要原因:

  翻译过来就是:没有找到数据源配置,url把错误归因于不能具体和不能体现数据源能够配置

解决办法:

  在pom.xml中将有关数据库的依赖注释掉,重新运行以下(我的需要重启idea)

  例如:

 

posted @ 2021-02-08 16:47  金玉良猿  阅读(168)  评论(0)    收藏  举报