swagger2忽略对象字段

swagger2忽略字段

使用@JsonIgnore注解即可
// 用户编号(主键)
@ApiModelProperty(“用户编号”)
@JsonIgnore
private String uid;
// 用户名
@ApiModelProperty(“用户名”)
private String username;
// 密码
@ApiModelProperty(“密码”)
private String password;
// 密码盐
@ApiModelProperty(“盐”)
@JsonIgnore
private String salt;
// 手机号
@ApiModelProperty(“手机号”)
private String phone;
// 邮箱
@ApiModelProperty(“邮箱”)
private String email;
// 头像
@ApiModelProperty(“头像”)
@JsonIgnore
private String photo;
// 注册时间
@JsonIgnore
private Date registerTime;
// 更新时间
@JsonIgnore
private Date updateTime;

你可能感兴趣的:(swagger2忽略对象字段)