spring中关于FeignClient的错误 QueryParam.value() was empty on parameter 1

现创建一个feignClient的接口,在其他服务调用改client时发现服务启动失败错误日志如下:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.product.client.ProductClient com.product.service.impl.ProductClient; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'productClient': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: QueryParam.value() was empty on parameter 1

查询client中,并未发现异常

最后发现其中一个接口中的参数@RequestParam中的参数没有加上value值

修改之后恢复正常。

猜你喜欢

转载自www.cnblogs.com/wangzun/p/9444173.html
今日推荐