转载:https://www.jianshu.com/p/5bc2efab2bd3#comments

private boolean isOrg;

如果是lombok 的 @Data注解
或者自定义的 get/set方法 是
getOrg(),
setOrg(boolean isOrg)
会导致json转换之后 参数前面的is丢失

解决方案:
fastjson: @JSONField(name="isOrg");
jackson: @JsonProperty("isOrg");

或者重写 get set方法,带上is
getIsOrg();
setIsOrg(boolean isOrg);



作者:xiao码
链接:https://www.jianshu.com/p/5bc2efab2bd3#comments
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-11
  • 2021-06-19
  • 2022-12-23
  • 2021-10-10
猜你喜欢
  • 2021-05-10
  • 2021-05-12
  • 2021-05-06
  • 2022-12-23
  • 2021-11-13
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案