2021年10月14日 | Leave a comment 问题: Caused by: java.lang.IllegalStateException: RequestParam.value() was empty on parameter 0 at feign.Util.checkState(Util.java:129) at org.springframework.cloud.openfeign.annotation.RequestParamParameterProcessor.processArgument(RequestParamParameterProcessor.java:65) at org.springframework.cloud.openfeign.support.SpringMvcContract.processAnnotationsOnParameter(SpringMvcContract.java:304) at feign.Contract$BaseContract.parseAndValidateMetadata(Contract.java:111) at org.springframework.cloud.openfeign.support.SpringMvcContract.parseAndValidateMetadata(SpringMvcContract.java:194) at feign.Contract$BaseContract.parseAndValidateMetadata(Contract.java:62) at feign.hystrix.HystrixDelegatingContract.parseAndValidateMetadata(HystrixDelegatingContract.java:47) 12345678 Caused by: java.lang.IllegalStateException: RequestParam.value() was empty on parameter 0 at feign.Util.checkState(Util.java:129) at org.springframework.cloud.openfeign.annotation.RequestParamParameterProcessor.processArgument(RequestParamParameterProcessor.java:65) at org.springframework.cloud.openfeign.support.SpringMvcContract.processAnnotationsOnParameter(SpringMvcContract.java:304) at feign.Contract$BaseContract.parseAndValidateMetadata(Contract.java:111) at org.springframework.cloud.openfeign.support.SpringMvcContract.parseAndValidateMetadata(SpringMvcContract.java:194) at feign.Contract$BaseContract.parseAndValidateMetadata(Contract.java:62) at feign.hystrix.HystrixDelegatingContract.parseAndValidateMetadata(HystrixDelegatingContract.java:47) 解决: 之前是 @RequestParam String aa @RequestParam(“aa”) String aa @GetMapping(value = "/apis/dst/a", headers = {"apicode=${yongyou.apilink.apiCode}"}) Map<String,Object> enterpriseSearchByName(@RequestParam("keyword") String keyword, @RequestParam("pageNum") Integer pageNum, @RequestParam("size") Integer size); 12 @GetMapping(value = "/apis/dst/a", headers = {"apicode=${yongyou.apilink.apiCode}"}) Map<String,Object> enterpriseSearchByName(@RequestParam("keyword") String keyword, @RequestParam("pageNum") Integer pageNum, @RequestParam("size") Integer size); 参考: