使用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来屏蔽此问题


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM