SpringBoot微服务项目,一个微服务调用另一个微服务的feign传文件时报错。
用postman测试一个接口,这个接口调用另一个微服务的feign接口上传文件时,出现feign.codec.EncodeException: Type definition error: ; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class java.io.FileDescriptor and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: org.springframework.web.multipart.support.StandardMultipartHttpServletRequest$StandardMultipartFile["inputStream"]->java.io.FileInputStream["fd"])错误
然后在PostMapping处添加consumes = MediaType.MULTIPART_FORM_DATA_VALUE,又出现
feign.codec.EncodeException: Could not write request: no suitable HttpMessageConverter found for request type and content type .这个应该怎么解决?
检查下环境 https://blog.csdn.net/Mou_O/article/details/104650209/参考这个 需要传值把
页:
[1]