"status": 405, "error": "Method Not Allowed", "message": "Request method 'POST' not supported"

调用同事的接口,丫用的put传对象,结果失败,我心说put不行post总没问题了吧,就给改成post了,还是不行,在swagger中调接口都进不去

在网上找了半天也没找到解决办法,自己又仔细去看接口,结果发现这么个情况

没错,丫写的接口地址后边有个空格,就是这么个情况,把空格去掉重启服务再测试就OK了。鄙视一下那些写完接口不自测的人...

猜你喜欢

转载自blog.csdn.net/yssa1125001/article/details/88764731