admin 管理员组

文章数量: 1086019

feign

报错内容如下:


***************************
APPLICATION FAILED TO START
***************************

Description:

Field warehouseFeign in com.rocwo.rwshop.controller.GoodsController required a bean of type 'com.rocwo.rwshop.warehouse.WarehouseFeign' that could not be found.

The injection point has the following annotations:
    - @org.springframework.beans.factory.annotation.Autowired(required=true)


Action:

Consider defining a bean of type 'com.rocwo.rwshop.warehouse.WarehouseFeign' in your configuration.


Process finished with exit code 0

================================================================================================

这一句就代表着feign-client的值不唯一,解决办法如下:

1.先在启动类上加 @EnableFeignClients 注解

2.然后在配置文件中加入

spring:main: #解决@FeignClient值重复问题,解決重复beanallow-bean-definition-overriding: true

 

本文标签: feign