Why SpringMVC Request method 'GET' not supported?

前端 未结 6 592
误落风尘
误落风尘 2020-12-01 05:34

I trying @RequestMapping(value = \"/test\", method = RequestMethod.POST) but is error

Code is

 @Controller
 public class HelloWordContr         


        
6条回答
  •  忘掉有多难
    2020-12-01 06:06

    Apparently some POST requests looks like a "GET" to the server (like Heroku...)

    So I use this strategy and it works for me:

    @RequestMapping(value = "/salvar", method = { RequestMethod.GET, RequestMethod.POST })
    

提交回复
热议问题