天天看点

org.apache.ibatis.exceptions.PersistenceException异常

关于我的org.apache.ibatis.exceptions.PersistenceException解决过程

org.apache.ibatis.exceptions.PersistenceException异常

1、首先检查mapper.xml文件的namespace是否正确

2、检查mybatis-config.xml配置文件

org.apache.ibatis.exceptions.PersistenceException异常

3、检查db.properties发现是我加上了useSSL=true

org.apache.ibatis.exceptions.PersistenceException异常

去掉后,问题解决

useSSL作用:不建议在没有服务器身份验证的情况下建立SSL连接。根据MySQL 5.5.45+、5.6.26+和5.7.6+的要求,如果不设置显式选项,则必须建立默认的SSL连接。需要通过设置useSSL=false来显式禁用SSL,或者设置useSSL=true并为服务器证书验证提供信任存储。

报错原因是因为版本问题,我的MySql数据库版本是5.7.29