課程
/后端開發(fā)
/Java
/SpringBoot構建電商基礎秒殺項目
都寫的是post方法,為什么他會報錯說找不到get方法呢,怎么解決這個問題呢
2019-01-24
源自:SpringBoot構建電商基礎秒殺項目 3-9
正在回答
這是因為沒有在對應的Controller類中添加對GET請求的處理方法。雖然你并沒有使用get請求,但是在進入首頁加載表單的時候,默認就是個get請求。
你試著把上面的“method = RequestMethod.XXXX”這個去掉,就可以同時處理GET和POST請求。
舉報
應用SpringBoot快速搭建擁有用戶、商品、交易及秒殺活動的電商秒殺應用。
4 回答overridden method does not throw 'com.miaosha.error.BusinessException'
9 回答仔細檢查了兩遍 。。。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 回答請問cannot resolve method是什么原因呀
3 回答generatorConfig.xml does not exist
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學習伙伴
掃描二維碼關注慕課網(wǎng)微信公眾號
2019-01-25
這是因為沒有在對應的Controller類中添加對GET請求的處理方法。雖然你并沒有使用get請求,但是在進入首頁加載表單的時候,默認就是個get請求。
你試著把上面的“method = RequestMethod.XXXX”這個去掉,就可以同時處理GET和POST請求。