启动报Error while adding the mapper 'xxx.xxx.xxx' to configuration.[java.lang.IllegalStateException: No typehandler found for property xxx]

【问题】启动报异常错误

Error while adding the mapper 'xxx.xxx.xxx' to configuration

java.lang.IllegalStateException: No typehandler found for property xxx

【原因】实体类属性类型问题

 开始还以为是依赖冲突、版本问题、yaml配置等等原因,结果后面一步一步回退代码,才发现是类型问题!!!

下面类型看起来好像是没什么问题的样子,其实主要原因还是没给JSONArray数据类型加处理的注解!!!(数据库的类型是json)

【解决】加上 @TableField(typeHandler = JacksonTypeHandler.class) 注解

 真实日了狗了

 

posted @ 2022-11-28 13:38  changlinlo  阅读(572)  评论(0编辑  收藏  举报