首页天道酬勤ApiModelProperty,apimodelproperty注解不生效

ApiModelProperty,apimodelproperty注解不生效

admin 08-15 00:59 391次浏览

@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}

原文地址:https://www.cnblogs.com/huanghuanghui/p/9086860.html

转载于:https://www.cnblogs.com/jpfss/p/11439601.html

UGUI实现ScrollView无限滚动效果
ApiModelProperty,apimodelproperty注解 Spring Boot中ApiModel注解不起作用,notblank注解不起作用
相关内容