java.sql.SQLException: validateConnection false

今天做案例的时候出现:

2019-06-03 22:20:04.942 ERROR 10280 --- [eate-1058545228] com.alibaba.druid.pool.DruidDataSource   : create connection error, url: jdbc:mysql://127.0.0.1:3306/mmall?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=UTC

java.sql.SQLException: validateConnection false
    at com.alibaba.druid.pool.DruidAbstractDataSource.validateConnection(DruidAbstractDataSource.java:1216) ~[druid-1.0.15.jar:1.0.15]
    at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1439) ~[druid-1.0.15.jar:1.0.15]
    at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:1888) ~[druid-1.0.15.jar:1.0.15]

这个使用的版本

     <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid</artifactId>
            <version>1.0.15</version>
        </dependency>

然后将其版本修改为:

  <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid</artifactId>
            <version>1.1.10</version>
        </dependency>

然后就可以访问了

posted @ 2019-06-03 22:24  菩提树下的丁春秋  阅读(15469)  评论(0编辑  收藏  举报