Servlet.service() for servlet [springmvc] in context with path [/ecps-portal] threw exception [An ex

 

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映射不一样)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值