使用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