对grid数据进行修改时有字段不能识别错误

 

 

错误再现:

Unrecognized field "fkSiteId" (class com.whaty.bean.PeClass), not marked as ignorable; nested exception is com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "fkSiteId" (class com.whaty.bean.PeClass), not marked as ignorable (12 known properties

解决办法:

对于字符串类型对grid的dataColumn字段进行驼峰命名转换

 

 

  • dataColumn:在sql类查询时,用于指定此字段在实体类中的成员名称,在集成功能中使用。

对于封装对象类型要进行对内部对象的.引用

org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Can not construct instance of com.whaty.bean.PeMajor: no String-argument constructor/factory method to deserialize from String value ('12833'); nested exception is com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of com.whaty.bean.PeMajor: no String-argument constructor/factory method to deserialize from String value ('12833')
 at [Source: java.io.PushbackInputStream@4bd0ae5a; line: 1, column: 150] (through reference chain: com.whaty.core.framework.api.domain.ParamsDataModel["bean"]->com.whaty.bean.PeClass["peMajor"])

 

posted on   upupup-999  阅读(109)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 零经验选手,Compose 一天开发一款小游戏!
· 一起来玩mcp_server_sqlite,让AI帮你做增删改查!!



点击右上角即可分享
微信分享提示