遇到一个奇怪的问题,使用Spring Boot和MyBatis-Plus。
在使用QueryWrapper查询语句时报错:“Cannot invoke “Object.hashCode()” because “key” is null”
我们使用的是MyBatis-Plus的3.3.2版本和JDK 19
据说,这个问题出现在JDK 17与MyBatis-Plus 3.3.x时会出现。
解决办法:
将MyBatis-Plus升级到3.5.1版本后,问题得到了解决。
字节叔叔 ©著作权
文章标签 java mybatis mybatiesplus 查询语句 文章分类 JavaScript 前端开发
遇到一个奇怪的问题,使用Spring Boot和MyBatis-Plus。
在使用QueryWrapper查询语句时报错:“Cannot invoke “Object.hashCode()” because “key” is null”
我们使用的是MyBatis-Plus的3.3.2版本和JDK 19
据说,这个问题出现在JDK 17与MyBatis-Plus 3.3.x时会出现。
解决办法:
将MyBatis-Plus升级到3.5.1版本后,问题得到了解决。
前言最近看到 这样的一篇文章[讨论]关于Object的identity hash code是否存在重复的问题, 呵呵 里面里面有一些 关于 Object.
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M