Feign调用服务出现‘Content-Type‘ cannot contain wildcard type ‘*‘
Feign带日期参数调用服务的时候报错: ‘Content-Type’ cannot contain wildcard type ‘*’,应该是fastjson进行日期转换时没指定json类型导致。
解决办法:
在Feign接口的请求上加上: consumes = MediaType.APPLICATION_JSON_VALUE表示用application/json的方式接收即可,如:
@PostMapping(value = "/report/queryBReport", consumes = MediaType.APPLICATION_JSON_VALUE)
public AjaxResult queryReport(@RequestBody QueryReportRequest request);