Feign调用异常org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET(代
Posted 756623607-zhang
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Feign调用异常org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET(代相关的知识,希望对你有一定的参考价值。
一、异常场景描述
明明是post请求,为啥到达服务器后就变成了get请求
2019-05-30 18:07:17.055 [http-nio-10650-exec-4] ERROR c.x.xcauto.common.controller.BaseControllerAdvice - 检测到未捕捉异常:IP:192.168.128.1 invoke url:http://172.17.244.170:10650/stock/valid/num/v1 Exception:public class org.springframework.web.HttpRequestMethodNotSupportedException org.springframework.web.HttpRequestMethodNotSupportedException: Request method ‘GET‘ not supported at org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping.handleNoMatch(RequestMappingInfoHandlerMapping.java:197) at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.lookupHandlerMethod(AbstractHandlerMethodMapping.java:376) at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.getHandlerInternal(AbstractHandlerMethodMapping.java:316) at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.getHandlerInternal(AbstractHandlerMethodMapping.java:62)
二、解决办法
将http请求换成https请求
以上是关于Feign调用异常org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET(代的主要内容,如果未能解决你的问题,请参考以下文章