@FeignClient定义冲突解决

解决同一个微服务, 调用另一个微服务的多个接口, 定义Feign接口初始化冲突问题

error: The bean 'XXXservice.FeignClientSpecification', defined in null, could not be registered. A bean with that name has already been defined in null and overriding is disabled.

1:@FeignClient  不支持多继承
2:@FeignClient(name= RemoteServiceXXXConstant.SERVICE_ID, qualifier = "beanName", contextId = "beanId")

3:使用@Autowired  @Qualifier("beanName") 注入
beanName

 

posted @ 2021-04-08 19:35  Bevis  阅读(794)  评论(0编辑  收藏  举报