You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide t

Tue Jun 02 19:41:18 CST 2020 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.
意思就是CST 2020警告:不建议在没有服务器身份验证的情况下建立SSL连接。根据MySQL 5.5.45+、5.6.26+和5.7.6+的要求,如果没有设置显式选项,则必须在默认情况下建立SSL连接。您需要通过设置useSSL=false显式地禁用SSL,或者设置useSSL=true并为服务器证书验证提供信任存储。

我的程序运行之后就报这个错误,然后控制台上也没有输出结果,我一开始以为是这个错误才导致程序没有输出结果,但其实是我忘记改变数据库的名字了。虽然这个错误会在控制台上显示,但是这个错误不会影响程序的编译和运行

如果实在想解决掉这个错误,就要在两个地方进行修改,第一就是在properties配置文件中的url位置进行修改,在后面添加?useSSL=false/true,false就表示禁用,true表示添加信任,修改如下所示:
url=jdbc:mysql://localhost:3306/mybatistest?characterEncoding=utf-8&useSSL=false
第二个修改的地方就是如果在xml文件中也配置了相关信息,那么xml文件中的url也要做出一样的修改,我就是因为没有改这里的url才出错的

你可能感兴趣的:(You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide t)