springcloud项目启动不了,出现两个bean

Description:

Field userFeign in com.yimao.cloud.order.controller.OrderController required a single bean, but 2 were found:

	
- feignBuilder: defined by method 'feignBuilder' in class path resource [com/hmily/tcc/springcloud/feign/HmilyRestTemplateConfiguration.class]
	

- feignHystrixBuilder: defined by method 'feignHystrixBuilder' in class path resource [org/springframework/cloud/sleuth/instrument/web/client/feign/TraceFeignClientAutoConfiguration.class]




Action:

Consider marking one of the beans as @Primary, updating the consumer to accept multiple beans, or using @Qualifier to identify the bean that should be consumed


Process finished with exit code 1


解决:

 

图一:springcloud项目启动不了,出现两个bean_第1张图片

图二:springcloud项目启动不了,出现两个bean_第2张图片

 

工作上遇到的问题:项目启动不了,检查是出现了两个beanfactory创建两个bean ,导致出错,具体理解老大做了讲解还在理解中。有大佬能有自己见解的可以评论一下,让大家更好的学习!

你可能感兴趣的:(springcloud项目启动不了,出现两个bean)