public BigDecimal getSkuPrice() {
return skuPrice;
}
public void setSkuPrice(BigDecimal skuPrice) {
this.skuPrice = skuPrice;
}
上为正确带码
public BigDecimal getSkuPice() {
return skuPrice;
}
public void setSkuPice(BigDecimal skuPrice) {
this.skuPrice = skuPrice;
}
上面为错误代码方法名少了一个r
上面的点码是自动生成的但是在前端循环的时候数据不出来包500错误说在类里找不到skuPice属性。
<dt><a href="./productDetail.jsp" title="摩托罗拉XT319" target="_blank">${item.itemName }</a></dt>
<!-- dt 25个文字+... -->
<dd class="orange">¥${item.skuPrice }</dd>
<dd class="h40">${item.promotion }</dd>
上面是前端代码
1,解决办法在类中重新生成set get代码记住set get方法名字一定要全。
2,记住开属性名开头不能大写(这个现象有的大写也可以有的就不行我去查了一下好像是srping管理beng映射不一样)