(解决)WARN: Establishing SSL connection without server‘s identity verification

Mon Mar 08 15:03:09 CST 2021 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.

查看翻译显示是数据库连接出的问题

需要设置useSSL=true

设置数据库连接当然要从数据库连接的配置文件进行更改,在配置mysql环境时,有如下四个连接MySQL需要配置的点(更改前是这样,所以才会报警告)

只需要将url稍作更改便可

<property name="url" value="jdbc:mysql://localhost:3306/mybatis?useSSL=false"/>

这样就符合要求啦

 

 


版权声明:本文为qq_40662239原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。