【Feign调用异常】org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported

一、异常场景描述

明明是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' not supported

原文地址:https://www.cnblogs.com/756623607-zhang/p/10960792.html

时间: 2024-11-08 00:48:18

【Feign调用异常】org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported的相关文章

org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'PUT' not supported

1:先上控制台报错信息 ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'PUT' not supported

解决JBoss7部署应用时Not installing optional component org.springframework.web.context.request.async.StandardServletAsyncWebRequest的错误

最近用JBoss部署WEB应用时报出了一个警告错误 15:50:06,865 WARN [org.jboss.as.ee] (MSC service thread 1-13) JBAS011006: Not installing optional component org.springframework.web.context.request.async.StandardServletAsyncWebRequest due to exception: org.jboss.as.server.d

Feign发送Get请求时,采用POJO对象传递参数的最终解决方案 Request method 'POST' not supported (附带其余好几个坑)

yml: feign: httpclient: enabled: true properties: #feign feign.httpclient.enabled=true <!-- https://mvnrepository.com/artifact/io.github.openfeign/feign-httpclient --> <dependency> <groupId>io.github.openfeign</groupId> <artifac

org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping

配置spring+shiro时,启动tomcat报错异常 严重: Context initialization failedorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping': Invocation of i

SSM报错:No converter found for return value of type: class java.util.ArrayList at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverter

我使用的是SSM框架,是在编写测试RESTFUL接口的时候出现, @RequestMapping(value = "/selectAll", method = RequestMethod.GET) @ResponseBody public ResponseEntity<List<User>> selectAll() { List<User> users = this.userService.selectAll(); if (null != users

SpringMVC框架出现 405 request method post not supported 的解决方法

在SpringMVC框架中当使用post请求服务,然后请求成功转到一个静态文件,如html,htm等网页时.页面出现405 request method post not supported错误,只要在spring的配置文件中加入下面代码即可: <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="urlMap"&

HTTP Status 405 - Request method &#39;GET&#39; not supported

springMVC框架中出现这个问题看看web.xml是否配置HiddenHttpMethodFilter ctrl +shift+T查看这个方法 配置: <!-- 配置org.springframework.web.filter.HiddenHttpMethodFilter:可以把post请求转为delete或putt请求 -->   <filter>     <filter-name>HiddenHttpMethodFilter</filter-name>

oauth2(spring security)报错method_not_allowed(Request method &#39;GET&#39; not supported)解决方法

报错信息 <MethodNotAllowed> <error>method_not_allowed</error> <error_description>Request method 'GET' not supported</error_description> </MethodNotAllowed> 39是单引号 原因 默认只支持post 解决方法 下载安装postman工具(或其他post工具) 使用post调用 代码增加get的

spring rest项目提示Request method &#39;PUT&#39; not supported Method Not Allowed 405 错误

{ "timestamp": "2019-04-28 17:43:07", "status": 405, "error": "Method Not Allowed", "message": "Request method 'PUT' not supported", "path": "/customer" } 今天项目发布后,发现