我尝试使用 spring openfeign在表单数据中定义多个参数
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
(版本 2.1.9.RELEASE)
这是方法
@PostMapping(value = "/endpoint", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
Result test(
@Param("file") MultipartFile file,
@Param("contraints") List<String> contraints);
但是在启动服务时出现以下异常:
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:?]