亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

不知道怎么解決 這個問題

https://img1.sycdn.imooc.com//5b56e9ff00010a1e13660768.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 15:58:43.126? INFO 7888 --- [? ? ? ? ? ?main] ConditionEvaluationReportLoggingListener :?


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

2018-07-24 15:58:43.151 ERROR 7888 --- [? ? ? ? ? ?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


正在回答

4 回答

還有一個就是如果你是按照視頻敲的代碼,開始勾選了mybatis,而你在pom.xml里沒有注釋掉,就用上邊的那個方法配置數據庫。但是如果你沒有注釋掉pom.xml里面的mybatis,注釋掉之后新建hello類,就可以運行了


0 回復 有任何疑惑可以回復我~

配置src\main\resources\application.properties

spring.datasource.url=jdbc:mysql\://192.168.0.20\:1504/f_me?setUnicode=true&characterEncoding=utf8
spring.datasource.username=******
spring.datasource.password=******


0 回復 有任何疑惑可以回復我~

我也是這個問題,用了樓上的方法還是沒用

0 回復 有任何疑惑可以回復我~
因為還沒有配置數據源
在@SpringBootApplication?注解后?添加?exclude?=?DataSourceAutoConfiguration.class?再運行


0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

不知道怎么解決 這個問題

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號