feignclient:
@FeignClient(value = "code-analysis")
public interface ICodeAnalysisService{
@PostMapping({"/cache"})
ResultVO<String> postResultCache(@RequestParam(value = "file",required = false) MultipartFile var1, @Valid @RequestPart("codeConfiguration") CodeConfigurationVO var2);
}调用客户端:
codeAnalysisService.postResultCache(file,codeConfig)异常是codeConfiguration不存在
发布于 2019-05-06 19:00:51
最终解决方案是:修改接口为:
ResultVO<String> postResultCacheInner(@RequestPart(value = "file",required = false) MultipartFile file,@RequestParam("codeConfiguration") String codeConfiguration);调用客户端:
codeAnalysisService.postResultCache(file,codeConfig);codeConfig是字符串类型,最后对codeConfig进行反序列化。
https://stackoverflow.com/questions/53845586
复制相似问题