关于spring boot WARN信息:Wed May 12 10:36:30 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.解决方式:
解决这个问题之前,先要弄明白这个WARN信息因何而起,mysql SSL是一个加密身份验证协议,mysql5.5之后的版本基本都能支持SSL,解决这个问题最简单的方式,就是设置useSSL=false,当然,你可能会说人家提供给你的协议,你不用,这不叫退而求其次么,其实,大型java项目开发都会把jar包部署在服务器上,服务器集群设置有防火墙,且外网无法访问,安全等级已经很高了,所以SSL的密文设定也可有可无了。解决方式如图: