首页 > 其他分享 >[Feign]feign.FeignException$MethodNotAllowed: [405] during [GET]

[Feign]feign.FeignException$MethodNotAllowed: [405] during [GET]

时间:2023-04-25 09:33:19浏览次数:31  
标签:Feign GET FeignException feign 405 during MethodNotAllowed

一个服务调用另一个服务使用feign,但是报错:feign.FeignException$MethodNotAllowed: [405] during [GET] 

原来是其中一个方法是get方法,但是因为feign的@RequestBody,会自动把Get请求变成Post,导致前后调用不一致报错。

 

 

 解决方法:在pom文件中加上

<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-httpclient</artifactId>
</dependency>

这个依赖,然后就成功解决啦!

 

标签:Feign,GET,FeignException,feign,405,during,MethodNotAllowed
From: https://www.cnblogs.com/gloriagg/p/17351662.html

相关文章

  • listwidget 实现横向流式排布关键以及过滤注意事项
    listWidget里面设置以下属性:this->setViewMode(QListView::IconMode);this->setResizeMode(QListView::Adjust);this->setMovement(QListView::Static);流式排布过滤时需要注意:在流式排布中过滤item采用隐藏的方式时,因为采用的是IconMode模式,所以偶尔会出现排版......
  • pwn | wustctf2020_getshell
    pwn|wustctf2020_getshellx86ret2textexp:frompwnimport*fromLibcSearcherimport*context.log_level='debug'p=remote('node4.buuoj.cn',28063)p.sendline(b'M'*(0x18+4)+p32(0x0804851B))p.interactive()......
  • API接口item_get-获取lazada商品详情(num_iid宝贝ID、title商品标题、price价格、nick
    什么是API?API是一个缩写,它代表了一个pplicationPAGC软件覆盖整个房间。API是用于构建软件应用程序的一组例程,协议和工具。API指定一个软件程序应如何与其他软件程序进行交互。例行程序:执行特定任务的程序。例程也称为过程,函数或子例程。协议:在两个系统之间传输数据的格式。......
  • git 不提交target及imp等文件
    在sourcetree中设置忽略提交文件,如下图所示添加忽略内容为:HELP.md/target/!.mvn/wrapper/maven-wrapper.jar!**/src/main/**/target/!**/src/test/**/target/###STS###.apt_generated.classpath.factorypath.project.settings.springBeans.sts4-cache###Intel......
  • MFC-GetClientRect获取窗口客户区的坐标
     win32APIRECTrect;CWnd*pWnd=GetDlgItem(IDC_LIST1);HWNDhWnd=pWnd->GetSafeHwnd();BOOLb=::GetClientRect(hWnd,&rect);//获取窗口客户区的坐标/*参数1:HWNDhWnd窗口句柄参数2:LPRECTlpRect返回客户区坐标......
  • Qt 将 widget 打印到 pdf
    一开始直接render到QPrinter里发现渲染出的图很小,原因是没有把两者的尺寸对齐到一致这里我们按printer和widget的比例缩放:defexportToPDF(w:QWidget,file_name):printer=QPrinter()printer.setPageSize(QPrinter.A4)printer.setOutputFormat(......
  • jmeter中get/post请求不同的参数传入
    Content-Type与JMeter接口测试的传参方式有很大关系一、常见Content-Type有三种:1).content-type:application/x-www-form-urlencoded  默认格式,当没有在信息头指定Content-Type的时候,默认使用这种格式传参key1=value1&key2=value2.......2). content-type:application/json......
  • Getselection能不能接受keyword?
    这个玩意绝对是个坑,CAD对Getselection的支持并不充分,需要通过keywordinput事件来弄,比较麻烦,而且很容易出问题。所以我的做法是,不使用,哈哈!下面这个是kean的代码:[CommandMethod("SELKW")]publicvoidGetSelectionWithKeywords(){Documentdoc=AcadApp.......
  • 使用cin和getline()输入字符串
    相同点:作为while的条件时,终止条件均为:Ctrlz(或则Z),执行本循环,执行完后进入下一个循环均为换行符。1strings;2while(cin>>s)3{4cout<<"youinputis:"<<endl;5cout<<s<<endl;6}1strings;2whi......
  • request getContextPath() getServletPath()[转的]
    项目名zhangyulonghttp://localhost:8080/zhangyulong/main/index.jsprequest.getContextPath()得到:/zhangyulongrequest.getServletPath()得到:/main/index.jsprequest.getRequestURI()得到:/zhangyulong/main/index.jsprequest.getRealPath("/")得到:F:......