zoukankan      html  css  js  c++  java
  • 16. nested exception is com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "auditUnitName"

     org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver:handleHttpMessageNotReadable:384 -Failed to read HTTP message: org.springframework.http.converter.HttpMessageNotReadableException: Could not read document: Unrecognized field "auditUnitName" (class com.ylkj.business.auditresult.problem.pojo.dto.ProblemSaveDto), not marked as ignorable (40 known properties: "problemNo", "rectifyperiodEnd", "amountOfPreviousYear", "projectName", "isCarryOver", "institutionProblem", "rectifyperiodStart", "isReportDisclosure", "area", "itemId", "problemNoGw", "requestCompleteTime", "problemAmount", "oneLevelType", "rectifyState", "responsibleUnit", "auditedUnit", "threeLevelType", "checkType", "auditOpinion", "responsiblePerson", "policyBasis", "twoLevelType", "itemTreeLevel", "importance", "currentYearInvolvedAmount", "definitionOfResponsibility", "problemType", "matterId", "year", "isIncludeFormalOpinions", "violationReason", "professionClassify", "isDistribute", "violationNature", "questionDate", "manageReason", "manageUnit", "isRemainProblem", "remainYear"])
     at [Source: java.io.PushbackInputStream@7c1c7412; line: 1, column: 936] (through reference chain: com.ylkj.business.auditresult.problem.pojo.dto.ProblemSaveDto["auditUnitName"]); nested exception is com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "auditUnitName" (class com.ylkj.business.auditresult.problem.pojo.dto.ProblemSaveDto), not marked as ignorable (40 known properties: "problemNo", "rectifyperiodEnd", "amountOfPreviousYear", "projectName", "isCarryOver", "institutionProblem", "rectifyperiodStart", "isReportDisclosure", "area", "itemId", "problemNoGw", "requestCompleteTime", "problemAmount", "oneLevelType", "rectifyState", "responsibleUnit", "auditedUnit", "threeLevelType", "checkType", "auditOpinion", "responsiblePerson", "policyBasis", "twoLevelType", "itemTreeLevel", "importance", "currentYearInvolvedAmount", "definitionOfResponsibility", "problemType", "matterId", "year", "isIncludeFormalOpinions", "violationReason", "professionClassify", "isDistribute", "violationNature", "questionDate", "manageReason", "manageUnit", "isRemainProblem", "remainYear"])
     at [Source: java.io.PushbackInputStream@7c1c7412; line: 1, column: 936] (through reference chain: com.ylkj.business.auditresult.problem.pojo.dto.ProblemSaveDto["auditUnitName"])
    

      

    解决方案如下:

    在需要转化的对象的类中添加注解,注解信息如下:

    @JsonIgnoreProperties(ignoreUnknown = true)

  • 相关阅读:
    windows server 2012 如何开启 hyper-v 并创建虚拟机
    ABP框架系列之二十四:(Email-Sending-EF-电子邮件发送)
    ABP框架系列之二十三:(EF-MySql-Integration-EF-MySql-集成)
    ABP框架系列之二十二:(Dynamic-Web-API-动态WebApi)
    ABP框架系列之二十一:(Domain-Services-领域服务)
    ABP框架系列之二十:(Dependency-Injection-依赖注入)
    ABP框架系列之十九:(Debugging-调试)
    ABP框架系列之十八:(Data-Transfer-Objects-数据转换对象)
    ABP框架系列之十七:(Data-Filters-数据过滤)
    ABP框架系列之十六:(Dapper-Integration-Dapper集成)
  • 原文地址:https://www.cnblogs.com/zkx4213/p/12606465.html
Copyright © 2011-2022 走看看