Exception in thread “main“ org.apache.ibatis.exceptions.PersistenceException:问题的解决

Exception in thread “main” org.apache.ibatis.exceptions.PersistenceException:解决

我遇到的这个问题解决蛮简单,查了一点资料,有些方法用了不管用,不过试了好久,最后还是遇上对的办法解决了 QAQ

解决:一般使用JDBC或者mybatis初学者,连接MySQL数据库时,使用正常的 url 会报错,报如上错误。具体原因我也不太清楚,希望有大佬在评论区提示一下。我的解决办法是:在 url 后添加jdbc:mysql://localhost:3306/*的时候在最后加上
?serverTimezone=UTC,问题得到结局。

添加前
Exception in thread “main“ org.apache.ibatis.exceptions.PersistenceException:问题的解决
添加后:
Exception in thread “main“ org.apache.ibatis.exceptions.PersistenceException:问题的解决