为了账号安全,请及时绑定邮箱和手机立即绑定

不知道怎么解决 这个问题

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 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

不知道怎么解决 这个问题

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信