使用FeignClient启动时出错的问题The bean 'xxx.FeignClientSpecification', defined in null

错误信息如下:

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

Description:

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

Action:

Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true

错误里面已经提示出来了 ,主要是springboot2.x版本以后被@FeignClient标记的接口对应的服务名称不能重复,原则上同一个服务的接口声明都应该尽量放到一个里面
这里可以设置spring.main.allow-bean-definition-overriding=true来屏蔽此问题

原文地址:https://www.cnblogs.com/bcde/p/13626681.html