MyBatis问题 class java.math.BigInteger cannot be cast to class java.lang.Long

由于mysql是使用8.0.21,所以驱动需要对应版本

1、改之前:

 compile 'mysql:mysql-connector-java:5.1.40'

改之后:

compile 'mysql:mysql-connector-java:8.0.21'


2、java.lang.ClassNotFoundException: Cannot find class: com.mysql.cj.jdbc.Driver
驱动需要改为com.mysql.cj.jdbc.Driver

3、Cause: java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the 'serverTimezone' configuration property) to use a more specifc time zone value if you want to utilize time zone support.

url添加上?characterEncoding=utf-8&serverTimezone=UTC

 

 

posted @ 2020-08-27 09:34  夜雨星空99  阅读(906)  评论(0)    收藏  举报