close

螢幕擷取畫面 2021-10-17 112244.jpg

狀況說明:

我想從表單送出想要更新的資料,

但是瀏覽器會回傳  Request method 'POST' not supported 。

 

解決方法:

找一找後發現,

原來是我Controller的@PostMapping的網址跟我原本提交表單的網址不一樣,

我原本提交表單的網址 : http://localhost:8080/TicketNet/updateSubmit?id=750

@PostMapping的網址 : http://localhost:8080/TicketNet/update

兩個網址要一致,更新的方法才可以生效。

 

Before

螢幕擷取畫面 2021-10-17 112759.jpg

 

After

螢幕擷取畫面 2021-10-17 113017.jpg

就可以解決了^^

螢幕擷取畫面 2021-10-17 113128.jpg

 

 

 

 

 

arrow
arrow
    文章標籤
    Spring MVC
    全站熱搜

    書童 發表在 痞客邦 留言(0) 人氣()