1. 程式人生 > >springmvc返回json資料去除null值

springmvc返回json資料去除null值

package com.xilehang.kaola.po.orderConfirm;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;

//轉json是排除null
@SuppressWarnings("deprecation")
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
public class GoodsList {
	private int goodsId;

	private String skuId;

}