I try to define multiple params in form-data with spring openfeign
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
(version 2.1.9.RELEASE)
here is the method
@PostMapping(value = "/endpoint", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
Result test(
@Param("file") MultipartFile file,
@Param("contraints") List<String> contraints);
but I get the following exception when starting service :
Caused by: java.lang.IllegalStateException: Method has too many Body parameters: public abstract (org.springframework.web.multipart.MultipartFile,java.util.List)
at feign.Util.checkState(Util.java:130) ~[feign-core-10.4.0.jar:?]