Cannot resolve com.mysq.jdbc.Connection.ping method. Will use 'SELECT 1' instead.

datasource配置

druid.url=jdbc:mysql://localhost:3306/blog?useUnicode=true&characterEncoding=utf8&autoReconnect=true

druid.driverClassName=com.mysql.jdbc.Driver

druid.username=root

#\u5BC6\u78BC\u53EF\u4EE5 druid \u52A0\u5BC6

druid.password=Biyu5YzU+6sxDRbmWEa3B2uUcImzDo0BuXjTlL505+/pTb+/0Oqd3ou1R6J8+9Fy3CYrM18nBDqf6wAaPgUGOg==

druid.filters=stat

druid.maxActive=20

druid.initialSize=1

druid.maxWait=60000

druid.minIdle=10

maxIdle:100

druid.timeBetweenEvictionRunsMillis=60000

druid.minEvictableIdleTimeMillis=300000

druid.validationQuery=SELECT 1

配置没有问题,单元测试也能拿到数据,就是出现标题错误,不过换一个dbc驱动,把5.1.12改成5.1.25就不报错了,个人估计是druid与mysql版本兼容性问题

你可能感兴趣的:(Cannot resolve com.mysq.jdbc.Connection.ping method. Will use 'SELECT 1' instead.)