对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"])