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

全部评论

相关推荐

05-30 12:03
山西大学 C++
offer来了我跪着接:不是骗子,等到测评那一步就知道为啥这么高工资了
点赞 评论 收藏
分享
05-09 13:22
门头沟学院 Java
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务