spring-cloud-openfeign
spring-cloud-openfeign copied to clipboard
Multiple @RequestPart (MultipartFile and DTO class) throws encoding error
trafficstars
Hi, below is my technology stack:
Spring Boot: 2.7.3 spring-cloud-starter-openfeign --> 3.1.4 feign-form-spring --> 3.8.0 feign-form --> 3.8.0 feign-core --> 10.12
Here is my feign interface:
@PostMapping(value = "/v1/reservas-atuariais/upload")
Long upload(@RequestPart("dto") CreateReservaAtuarialDto dto, @RequestPart("file") MultipartFile file);
As you can see, I have one DTO class and a MultipartFile at the same time. Whenever I request this endpoint it gives this error: error converting request body.
I have tried many solutions and encoder implementations but none of them work. It seems like a bug I think. Can you guys give some help?