小工具知识网

当前位置: 首页 > 行业知识 > 使用mybatisplus时 Cause: java.lang.IllegalStateException: Type handler was null on parameter mapping

行业知识

使用mybatisplus时 Cause: java.lang.IllegalStateException: Type handler was null on parameter mapping

2026-10-25 20:55:34 来源:互联网转载

开发背景:原生框架为mybatis+springcloud,自主升级为mybatisplus后调用save方法时出现问题

报错:

 Cause: java.lang.IllegalStateException: Type handler was null on parameter mapping for property 'params'. It was either not specified and/or could not be found for the javaType (java.util.Map) : jdbcType (null) combination.

解决及原因:

实体类继承了BaseEntity  在BaseEntity当中有params字段 

而Map集合是插入不到数据库当中的,即使它为空并且数据库字段当中也没有,依然会报错,解决办法要么是写一个TypeHandle对它进行全局转换(没必要,毕竟不存入到数据库),要么加一个注解(可以解决)

@TableField(exist = false)

上一篇:异地长期居住人员备案结果怎么查询

下一篇:索引量工具使用秘籍,查询优化技巧轻松掌握!