@ApiModelProperty()用於方法,字段; 表示對model屬性的說明或者數據操做更改
value–字段說明
name–重寫屬性名字
dataType–重寫屬性類型
required–是否必填
example–舉例說明
hidden–隱藏數組
@ApiModel(value="user對象",description="用戶對象user") public class User implements Serializable{ private static final long serialVersionUID = 1L; @ApiModelProperty(value="用戶名",name="username",example="xingguo") private String username; @ApiModelProperty(value="狀態",name="state",required=true) private Integer state; private String password; private String nickName; private Integer isDeleted; @ApiModelProperty(value="id數組",hidden=true) private String[] ids; private List<String> idList; //省略get/set }