报错信息:
Could not write JSON: / by zero; nested exception is com.fasterxml.jackson.databind.JsonMappingException: / by zero (through reference chain: com.ktg.common.core.page.TableDataInfo["rows"]->com.github.pagehelper.Page[0]->com.ktg.mes.mz.domain.vo.SalesOrderSummaryVO["grossMargin"])
报错原因:对应的实体类中没有该字段(grossMargin),但是有该字段的方法 。
解决方法:
1、通过添加@JsonIgnore注解来解决
2、通过添加@JsonIgnoreProperties注解解决