微服务调用跟踪sleuth和分布式事务seata不兼容的问题

Blade 未结 1 1156
444570114
444570114 2020-09-08 16:39

一、该问题的重现步骤是什么?

1. 在任一模块中添加blade-starter-trace和blade-starter-transactioni依赖

2. 启动该模块过程中报错,错误信息:

Field existingConcurrencyStrategy in org.springblade.core.cloud.hystrix.BladeHystrixAutoConfiguration required a single bean, but 2 were found:

- seataHystrixConcurrencyStrategy: defined by method 'seataHystrixConcurrencyStrategy' in class path resource [com/alibaba/cloud/seata/feign/hystrix/SeataHystrixAutoConfiguration.class]

- sleuthHystrixConcurrencyStrategy: defined by method 'sleuthHystrixConcurrencyStrategy' in class path resource [org/springframework/cloud/sleuth/instrument/hystrix/SleuthHystrixAutoConfiguration.class]

3.


二、你期待的结果是什么?实际看到的又是什么?

期望同时开启微服务监控和分布式事务,实际二者目前不兼容,属于seata的bug

三、你正在使用的是什么产品,什么版本?在什么操作系统上?

bladex,2.5.1.release,win10

四、请提供详细的错误堆栈信息,这很重要。

***************************

APPLICATION FAILED TO START

***************************


Description:


Field existingConcurrencyStrategy in org.springblade.core.cloud.hystrix.BladeHystrixAutoConfiguration required a single bean, but 2 were found:

- seataHystrixConcurrencyStrategy: defined by method 'seataHystrixConcurrencyStrategy' in class path resource [com/alibaba/cloud/seata/feign/hystrix/SeataHystrixAutoConfiguration.class]

- sleuthHystrixConcurrencyStrategy: defined by method 'sleuthHystrixConcurrencyStrategy' in class path resource [org/springframework/cloud/sleuth/instrument/hystrix/SleuthHystrixAutoConfiguration.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

五、若有更多详细信息,请在下面提供。

1条回答
提交回复