• com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class


    错误信息如下:

    Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class org.apache.ibatis.executor.loader.javassist.JavassistProxy
    Factory$EnhancedResultObjectProxyImpl and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS)
    (through reference chain: java.util.HashMap["data"]->java.util.ArrayList[0]->com.wzh.app.users.PersonVo_$$_jvstc02_0["handler"])
    at com.fasterxml.jackson.databind.exc.InvalidDefinitionException.from(InvalidDefinitionException.java:77)
    at com.fasterxml.jackson.databind.SerializerProvider.reportBadDefinition(SerializerProvider.java:1277)

    注意这一行:com.wzh.app.users.PersonVo_$$_jvstc02_0["handler"])

    在PersonVo类上面增加以下配置:

    @JsonIgnoreProperties(value = { "handler"})
    public class PersonVo {...}

    问题解决。

  • 相关阅读:
    欧拉函数的一个性质及其证明
    【机器人M号】题解
    【求和】题解
    uva11292贪心基础题目
    hdu 1009 贪心基础题
    近期计划,理清思路,大步向前
    hdu1712 分组背包
    TOJ3596 二维背包
    hdu1114 完全背包
    BestCoder Round #81 (div.2)1001
  • 原文地址:https://www.cnblogs.com/yshyee/p/14200964.html
Copyright © 2020-2023  润新知