com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class (through reference chain: com.jd.lean.mjp.dal.entity.Province_$$_jvste70_0[“handler”])
1.背景
使用mybatis 一对多,collection查询的时候,报错
2.解决
一对多中的一,实体类,加上注解
@JsonIgnoreProperties(value = {“handler”})
3. 原因
json 序列化时没有忽略 bean 中的一些不需要转化的属性导致的,比如:handler