使用intellij idea搭建SPringboot 依赖了 mybatis 的 就报错

https://img3.mukewang.com/5b57093b0001ee6e13660768.jpg java.lang.Object.wait(Native Method)

 java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)

 com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:43)

2018-07-24 18:55:36.251  INFO 2944 --- [           main] ConditionEvaluationReportLoggingListener : 


Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

2018-07-24 18:55:36.259 ERROR 2944 --- [           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).



Process finished with exit code 1


慕粉2228388982
浏览 2267回答 2
2回答

柯旦v

可能是没有导入Driver相关数据库驱动包

流年4水0

确保yml里书写格式正确。然后Target先删掉,maven clear,package。ide重启。第一次不好使第二次直到好使即可。
打开App,查看更多内容
随时随地看视频慕课网APP