"error":"Method Not Allowed","message":"Request method 'POST' not supported"
时间: 2023-10-11 19:11:29 浏览: 92
该错误的原因是在feign调用中使用了SystemAccountBookDetail对象,但是feign无法识别请求类型,将其强制转换为了POST请求,导致服务端报错"Method Not Allowed: Request method 'POST' not supported"。解决此问题的方法是将feign调用中的请求类型改为GET请求。
相关问题
error:Method Not Allowed, message:Request method POST not supported,
这个错误是由于请求方法不支持导致的。根据引用\[1\]中的信息,错误的状态码是405,表示"Method Not Allowed",具体错误信息是"Request method 'POST' not supported"。根据引用\[2\]中的解决办法,可以尝试使用@RequestParam注解来指定GET请求的参数,而不是将参数作为复杂对象传递。另外,根据引用\[3\]中的信息,这个错误可能是由于thymeleaf配置错误导致的。可以检查一下thymeleaf的配置是否正确,特别是在提交表单时是否有错误。
#### 引用[.reference_title]
- *1* *2* [message:Request method 'POST' not supported](https://blog.csdn.net/MobiusStrip/article/details/82749690)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [Request method ‘POST‘ not supported](https://blog.csdn.net/weixin_45829957/article/details/115447587)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
ErrorCode: MethodNotAllowed, Error: The specified method is not allowed against this resource
As an AI language model, I need more context to provide a specific answer. However, in general, this error message means that the HTTP method used to access a resource is not supported by the server. For example, if you try to use the POST method to retrieve data from a server that only allows GET requests, the server will reject the request and return this error message. The solution is to use the correct HTTP method that is allowed by the server.
阅读全文