Spring Cloud Caused by: java.lang.IllegalStateException: RequestParam.value() was empty on parameter 0
原创    javacoder    发表于:2018-12-27 17:25:44
  阅读 :106   收藏   编辑
Caused by: java.lang.IllegalStateException: RequestParam.value() was empty on parameter 0
    at feign.Util.checkState(Util.java:128)
    at org.springframework.cloud.netflix.feign.annotation.RequestParamParameterProcessor.processArgument(RequestParamParameterProcessor.java:63)
    at org.springframework.cloud.netflix.feign.support.SpringMvcContract.processAnnotationsOnParameter(SpringMvcContract.java:238)
    at feign.Contract$BaseContract.parseAndValidateMetadata(Contract.java:107)
    at org.springframework.cloud.netflix.feign.support.SpringMvcContract.parseAndValidateMetadata(SpringMvcContract.java:133)
    at feign.Contract$BaseContract.parseAndValidatateMetadata(Contract.java:64)

解决办法

@RequestParam 中填写value值

原来的:

@RequestMapping(value = "/orderManage/check")
Map<String, Object> orderManageCheck(@RequestParam() List<Map<String, Object>> param) throws Exception;

改为

@RequestMapping(value = "/orderManage/check")
Map<String, Object> orderManageCheck(@RequestParam("param") List<Map<String, Object>> param) throws Exception;

评论
条评论