使用Feign调用三方服务接口时,接口使用对象接收参数,在feign中调用时需要指定json传参类型(consumes = "application/json")
例:
FeignClient.java
@PutMapping(value = "/instcollect/uploadReport",consumes = "application/json") String uploadReport(Map map);
三方服务controller
Controller.java
@PutMapping("/uploadReport") public String uploadReport(@RequestBody ReportUploadForm form){ return instCollectService.uploadReport(form); }