HeaderMap Method has too many Body parameters
在 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了。
本文来自博客园,作者:VipSoft 转载请注明原文链接:https://www.cnblogs.com/vipsoft/p/14758682.html