我有一个问题@ApiModelProperty
大摇大摆地。在我的模型中,我使用@ApiModelProperty
像这样
private static final long serialVersionUID = -7142106197262010406L;
private int brandId;
private String brandName;
private String fullName;
private String webSite;
private String logoUrl;
private String note;
@ApiModelProperty(position = 1, required = true, value="")
public int getBrandId() {
return brandId;
}
public void setBrandId(int brandId) {
this.brandId = brandId;
}
@ApiModelProperty(position = 2, required = true)
public String getBrandName() {
return brandName;
}
public void setBrandName(String brandName) {
this.brandName = brandName;
}
@ApiModelProperty(position = 3, required = true)
public String getFullName() {
return fullName;
}
public void setFullName(String fullName) {
this.fullName = fullName;
}
@ApiModelProperty(position = 4, required = true)
public String getWebSite() {
return webSite;
}
public void setWebSite(String webSite) {
this.webSite = webSite;
}
@ApiModelProperty(position = 5, required = true)
public String getLogoUrl() {
return logoUrl;
}
public void setLogoUrl(String logoUrl) {
this.logoUrl = logoUrl;
}
@ApiModelProperty(position = 6, required = true)
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
}
我不明白为什么@ApiModelProperty
不工作。谁能帮助我如何解决这个问题。请。感谢大家!
您是否用 @ApiModel 注释了您的类?
@ApiModel
public class Brand{
private String brandName;
//...
@ApiModelProperty(position = 1, required = true, value="")
public int getBrandId() {
return brandId;
}
public void setBrandId(int brandId) {
this.brandId = brandId;
}
//...
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)