IDEA 使用mybatis 报 The last packet sent successfully to the server was 0 milliseconds ago.
解决 IDEA 使用mybatis 报 The last packet sent successfully to the server was 0 milliseconds ago问题
·
插件版本
mybatis-generator-maven-plugin 1.3.5
xml配置:generatorConfig.xml
maven :3.6.3
错误明细具体内容:The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
解决方案
1、检查generatorConfig.xml 配置中链接地址是否正确,可以用其他工具连接一下数据库
2、如果1没有问题,重新下载 mybatis-generator-maven-plugin (删除本地maven库文件),maven reload 一下
3、如果2没有问题,检查IDEA配置中的java版本,我的错误就是这个原因导致的,我IDEA Project Structure 中 配置的java 11 ,mybatis-generator-maven-plugin 1.3.5 应该是不支持高版本的jdk,改成java8就好了

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐
所有评论(0)