現創建一個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值
修改之后恢復正常。