在 Feign 方法里面添加 Header 报 Method has too many Body parameters

    @PostMapping(value = "/sendsms")
    String sendSMS(@HeaderMap Map<String, Object> headerParam, @RequestBody Map<String, Object> bodyParam);

 

修改代码如下

    @PostMapping(value = "/message/sendsms")
    String sendSMS(@RequestHeader Map<String, Object> headerParam, @RequestBody Map<String, Object> bodyParam);

因为 RequestBody 是 Spring 的。HeaderMap 是 Feign的,HeaderMap改成 RequestHeader 都用 Spring 的就OK了。

相关文章:

  • 2022-12-23
  • 2022-01-18
  • 2021-12-16
  • 2022-12-23
  • 2021-05-14
  • 2021-06-15
  • 2021-05-27
猜你喜欢
  • 2022-12-23
  • 2021-06-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案