mybatis逆向工程遇到的坑

1.7的版本 支持 mysql-connector-java的jar包版本5.1.44-5.1.17 1.8JDK可以支持更高的(没去测),否则jdk与mysql-connector-java冲突会出现:
java.lang.UnsupportedClassVersionError: com/mysql/jdbc/Driver : Unsupported major.minor version 52.0

java.math.BigInteger cannot be cast to java.lang.Long

Could not create connection to database server
等等错误。
注:
Wed Sep 19 21:59:53 CST 2018 WARN: Establishing SSL connection without server’s identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn’t set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to ‘false’. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
警告是因为mysql8.0中新增ssl,其是一种加密技术在客户端连接数据库的中间做了加密,需要在数据库连接url加上useSSL=true,如:
jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8&useSSL=false

猜你喜欢

转载自blog.csdn.net/qq_37514822/article/details/82779367