我有一个spring boot应用程序,其中一个post方法如下
@RequestMapping(value = "/myresource", method = RequestMethod.POST)
public ResponseEntity<MyResponse> myMethod(
@RequestBody MyPOJO pojo, @CookieValue("xyz") xyz,
@RequestHeader("abc") abc){//do something}
当我使用http点击网址时,它会出现以下错误:
{
"timestamp": 12313,
"status": 405,
"error": "Method Not Allowed",
"exception": "org.springframework.web.HttpRequestMethodNotSupportedException",
"message": "Request method 'GET' not supported",
"path": "mypath"
}
然而,当我使用https点击相同的网址时,它会正确地为我提供预期的输出。
这里出了什么问题?