加入seata依赖,服务启动失败

Blade 未结 2 2714
半路笙歌
半路笙歌 剑圣 2021-04-14 15:35

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

1. 想要使用分布式事务seata,但是加入seata依赖

blade-starter-transaction

之后,启动服务失败。

2. 在启动类上加了

@SeataCloudApplication

3.在服务类上加了

(= Exception.)

4.按照文档做的

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

期待的结果,可以使用seata,正常启动服务。


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

bladeX

2.5.1

macos/linux


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

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

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

2021-04-14 15:30:14.506 ERROR [ihp-order,,,] 11518 --- [ fileListener_1] io.seata.config.FileConfiguration        : fileListener execute error:org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@7f572c37 has not been refreshed yet

Disconnected from the target VM, address: '127.0.0.1:52248', transport: 'socket'

Process finished with exit code 1

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

image.png

2条回答
提交回复