我试图使用feign.HeaderMap注解在rest请求中传递一个包含HTTP头的映射,但这些出现在正文中。
以下是代码:
@FeignClient(name = "accounts", url = "localhost:8080") public interface AccountClient {
@RequestMapping(method = RequestMethod.GET, value = "/rest/accounts/get", produces = MediaType.APPLICATION_JSON_VALUE)
Account findOne(@RequestParam("id") String id, @HeaderMap Map headers);
}