解决Mybatis逆向工程报错出现警告

在使用MyBatis逆向工程自动生成代码时,出现报错,提示警告如下:

Thu Apr 11 21:32:55 CST 2019 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.
从警告信息可以得知:这是MySql数据库的SSL连接问题,不建议使用没有带服务器身份验证的SSL连接,这是在MySQL5.5.45+, 5.6.26+ 和 5.7.6+版本中才有的这个问题。

解决办法:可以直接忽略这个警告,不进行SSL证书验证。在数据库连接后直接添加 useSSL=false 即可解决。

jdbc:mysql://localhost:3306/test?useSSL=false

你可能感兴趣的:(Java,Web)