springcloud异常合集
springcloud异常合集
出现以上报错时,可在配置文件中添加如下配置:
yml格式:
#当出现相同名字的类进行注册时,准许覆盖注册
spring
main
allow-bean-definition-overridingtrue
properties格式:
#当出现相同名字的类进行注册时,准许覆盖注册
spring.main.allow-bean-definition-overriding=true
2、Field industryTagsStoreService in com.ys.dms.industry.controller.IndustryTagsStoreController required a bean of type 'com.ys.dms.common.feign.SettingFeign' that could not be found.
加上扫描路径即可
@EnableDiscoveryClient @SpringBootApplication @EnableEurekaClient @EnableFeignClients(basePackages = { "com.ys.dms.industry.feign" }) public class IndustryCenterApp { public static void main(String[] args) { // TODO Auto-generated method stub SpringApplication.run(IndustryCenterApp.class, args); } }
版权声明:
作者:admin
链接:http://lixiaofang.top/2022/01/22/springcloud%e5%bc%82%e5%b8%b8%e5%90%88%e9%9b%86/
来源:码农日志
文章版权归作者所有,未经允许请勿转载。
THE END
二维码
共有 0 条评论