初学mybatis时遇到org.apache.ibatis.exceptions.PersistenceException报错的解决方法 偏执的太偏执、 2023-10-04 08:29 2阅读 0赞 ![在这里插入图片描述][20210316205843160.png_pic_center] ##### 解决方法: ##### 修改mybatis-config.xml配置文件如下(将useSSL的true改为false) useSSL=false <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd"> <configuration> <environments default="development"> <environment id="development"> <transactionManager type="JDBC"/> <dataSource type="POOLED"> <property name="driver" value="com.mysql.jdbc.Driver"/> <property name="url" value="jdbc:mysql://localhost:3306/mybatis?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai"/> <property name="username" value="root"/> <property name="password" value="root"/> </dataSource> </environment> </environments> <mappers> <mapper resource="com/lyp/dao/UserMapper.xml"/> </mappers> </configuration> [20210316205843160.png_pic_center]: https://img-blog.csdnimg.cn/20210316205843160.png#pic_center
还没有评论,来说两句吧...