
记录一次设置了spring.main. allow-bean-definition-overriding=true无效的情况
The bean 'xxx-api.FeignClientSpecification', defined in null, could not be registered. A bean with that name has already been defined in null and overriding is disabled.
·
根据上述提示,直观的可以知道得设置spring.main. allow-bean-definition-overriding=true;
配置是通过nacos集中管理,当在本地bootstrap.yml中配置了时,启动依旧报上述错误,解决方法如下:
可以新建一个application.properties或者application.yml,将spring.main. allow-bean-definition-overriding=true重新设置一遍;在或者操作SpringApplication如:
最后记得将整个项目Rebuild下在启动
点击阅读全文
更多推荐
所有评论(0)