一、该问题的重现步骤是什么?
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
五、若有更多详细信息,请在下面提供。
可以参考下官方的这个issue,排除bean或者重写bean:https://github.com/seata/seata/issues/1587
扫一扫访问 Blade技术社区 移动端