課程
/后端開(kāi)發(fā)
/Java
/SpringBoot構(gòu)建電商基礎(chǔ)秒殺項(xiàng)目
都寫(xiě)的是post方法,為什么他會(huì)報(bào)錯(cuò)說(shuō)找不到get方法呢,怎么解決這個(gè)問(wèn)題呢
2019-01-24
源自:SpringBoot構(gòu)建電商基礎(chǔ)秒殺項(xiàng)目 3-9
正在回答
這是因?yàn)闆](méi)有在對(duì)應(yīng)的Controller類(lèi)中添加對(duì)GET請(qǐng)求的處理方法。雖然你并沒(méi)有使用get請(qǐng)求,但是在進(jìn)入首頁(yè)加載表單的時(shí)候,默認(rèn)就是個(gè)get請(qǐng)求。
你試著把上面的“method = RequestMethod.XXXX”這個(gè)去掉,就可以同時(shí)處理GET和POST請(qǐng)求。
舉報(bào)
應(yīng)用SpringBoot快速搭建擁有用戶、商品、交易及秒殺活動(dòng)的電商秒殺應(yīng)用。
4 回答overridden method does not throw 'com.miaosha.error.BusinessException'
9 回答仔細(xì)檢查了兩遍 。。。Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
1 回答cannot resolve method "selectUsrById" && "setEncrptPassword"
3 回答請(qǐng)問(wèn)cannot resolve method是什么原因呀
3 回答generatorConfig.xml does not exist
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購(gòu)課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2019-01-25
這是因?yàn)闆](méi)有在對(duì)應(yīng)的Controller類(lèi)中添加對(duì)GET請(qǐng)求的處理方法。雖然你并沒(méi)有使用get請(qǐng)求,但是在進(jìn)入首頁(yè)加載表單的時(shí)候,默認(rèn)就是個(gè)get請(qǐng)求。
你試著把上面的“method = RequestMethod.XXXX”這個(gè)去掉,就可以同時(shí)處理GET和POST請(qǐng)求。