Spring Boot 启动错误:Error starting ApplicationContext. To display the conditions report re-run your app

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2018-07-28 00:09:54.098 ERROR 5412 --- [           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


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).

这里写图片描述

我的原因是在初始化的时候 勾选了spring-boot-starter-data-jpa 但是没有配置数据库!
这里写图片描述

解决方法很简单: 要么暂时先把它注释起来,要么配置文件里配置好数据库信息。
(因为本人也不确定这个问题是不是全部由我遇到的这个原因引起的,所以仅供参考,谢谢)

猜你喜欢

转载自blog.csdn.net/qq_33472557/article/details/81256249
今日推荐