为返回给界面的bean中的字段添加@JsonInclude(value=Include.NON_NULL)注解,当值为null时隐藏字段
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
package com.nis.domain.restful;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.wordnik.swagger.annotations.ApiModelProperty;
|
||||
|
||||
public class NtcPzReport extends NtcReportEntity<NtcPzReport>{
|
||||
|
||||
private static final long serialVersionUID = 987165268916441272L;
|
||||
@JsonInclude(value=Include.NON_NULL)
|
||||
@ApiModelProperty(value="配置ID", required=true)
|
||||
protected Long cfgId;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user