Jfinal3.4关联MySQL8.0时启动错误

最近做项目时,同时升级到了Jfinal3.4和MySQL8.0,其中mysql-connector-java用的是8.0.11。结果启动项目时报错如下:

Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.

我根据网上说的试了下,光改serverTimezone设定没用,还需要改com.mysql.cj.jdbc.Driver,这个具体应该怎么操作?

评论区

JFinal

2018-05-05 00:33

配置一下 DruidPlugin.setDriverClass("com.mysql.cj.jdbc.Driver");

456414654

2018-07-20 15:03

@JFinal 加这个还是楼主的情况

天朝子民

2018-10-14 16:24

http://www.jfinal.com/share/1189
试试

热门反馈

扫码入社