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
版权声明:本文标题:feign 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://roclinux.cn/p/1699442107a349654.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论