Jackson序列化json中去除null字段

之前一般用的这样的方式:

但是这个已经过时了,官方推荐的是使用JsonInclude:

所以可以这么使用:

猜你喜欢

转载自blog.csdn.net/Dongguabai/article/details/81434595