zoukankan      html  css  js  c++  java
  • com.fasterxml.jackson.databind.exc.InvalidDefinitionException

    com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class org.apache.ibatis.executor.loader.javassist.JavassistProxyFactory$EnhancedResultObjectProxyImpl and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: com.hnit.learning_shop.common.Result["data"]->java.util.ArrayList[0]->com.hnit.learning_shop.entity.XcUser_$$_jvst31f_0["handler"])

    一般报这个异常大部分是由于没有序列化。

    在实体类上加上@JsonIgnoreProperties注解。

    @JsonIgnoreProperties(value= {"handler"})

    此注解是类注解,作用是json序列化时将Java bean中的一些属性忽略掉,序列化和反序列化都受影响。

  • 相关阅读:
    自动化测试模型介绍
    接口测试
    adb 命令
    测试思路
    软件测试基础
    页面元素定位
    环境搭建
    自动化
    使用python操作mysql数据库
    mysql索引原理
  • 原文地址:https://www.cnblogs.com/yz-bky/p/13024738.html
Copyright © 2011-2022 走看看