实体类字段为JSON类型时,必须使用标签进行判定以排除其为null的可能性,否则会报下面的找不到为null时的指定。

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

在这里插入图片描述

解决方法:在java对应的实体类添加对应的字段,重点是加上(typeHandler = JacksonTypeHandler.class)这个注解

在这里插入图片描述

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐