欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

使用Mybatis连接到Mysql报错,WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.2

程序员文章站 2024-01-24 11:30:40
在Eclipse中使用springboot整合Mybatis,连接到5.7版本Mysql报错WARN: Establishing SSL connection without server's identity verification is not recommended. According t ......

在eclipse中使用springboot整合mybatis,连接到5.7版本mysql报错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.

修改数据库连接配置 application.properties

加上usessl=false或者&usessl=true即可

如:

spring.datasource.url = jdbc:mysql://localhost:3306/test1?useunicode=true&characterencoding=utf-8&usessl=false