1. 修复 seata 配置错误

2. 引入 Spring Cloud Stream RocketMQ 依赖
This commit is contained in:
YunaiV 2020-04-13 22:39:50 +08:00
parent 3dd7f2d0af
commit 0761607bef
10 changed files with 41 additions and 18 deletions

View File

@ -100,8 +100,8 @@
<!-- MQ 相关 --> <!-- MQ 相关 -->
<dependency> <dependency>
<groupId>org.apache.rocketmq</groupId> <groupId>com.alibaba.cloud</groupId>
<artifactId>rocketmq-spring-boot-starter</artifactId> <artifactId>spring-cloud-starter-stream-rocketmq</artifactId>
</dependency> </dependency>
<!-- Job 相关 --> <!-- Job 相关 -->

View File

@ -78,6 +78,12 @@ logging:
# Seata 配置项 # Seata 配置项
seata: seata:
tx-service-group: default # Seata 事务组编号,用于 TC 集群名
# 服务配置项,对应 ServiceProperties 类
service:
# 虚拟组和分组的映射
vgroup-mapping:
default: default
# Seata 注册中心配置项 # Seata 注册中心配置项
registry: registry:
type: nacos # 注册中心类型 type: nacos # 注册中心类型

View File

@ -74,8 +74,8 @@
<!-- MQ 相关 --> <!-- MQ 相关 -->
<dependency> <dependency>
<groupId>org.apache.rocketmq</groupId> <groupId>com.alibaba.cloud</groupId>
<artifactId>rocketmq-spring-boot-starter</artifactId> <artifactId>spring-cloud-starter-stream-rocketmq</artifactId>
</dependency> </dependency>
<!-- Job 相关 --> <!-- Job 相关 -->

View File

@ -50,6 +50,12 @@ rocketmq:
# Seata 配置项 # Seata 配置项
seata: seata:
tx-service-group: default # Seata 事务组编号,用于 TC 集群名
# 服务配置项,对应 ServiceProperties 类
service:
# 虚拟组和分组的映射
vgroup-mapping:
default: default
# Seata 注册中心配置项 # Seata 注册中心配置项
registry: registry:
type: nacos # 注册中心类型 type: nacos # 注册中心类型

View File

@ -47,7 +47,6 @@
<mybatis-plus.version>3.1.1</mybatis-plus.version> <mybatis-plus.version>3.1.1</mybatis-plus.version>
<xxl-job.version>2.0.1</xxl-job.version> <xxl-job.version>2.0.1</xxl-job.version>
<guava.version>27.0.1-jre</guava.version> <guava.version>27.0.1-jre</guava.version>
<rocketmq-spring-boot-starter.version>2.0.1</rocketmq-spring-boot-starter.version>
<maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version> <maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
<org.projectlombok.version>1.16.14</org.projectlombok.version> <org.projectlombok.version>1.16.14</org.projectlombok.version>
@ -171,13 +170,6 @@
<version>${xxl-job.version}</version> <version>${xxl-job.version}</version>
</dependency> </dependency>
<!-- MQ 相关 -->
<dependency>
<groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-spring-boot-starter</artifactId>
<version>${rocketmq-spring-boot-starter.version}</version>
</dependency>
<!-- 云服务相关 --> <!-- 云服务相关 -->
<dependency> <dependency>
<groupId>com.qiniu</groupId> <groupId>com.qiniu</groupId>

View File

@ -70,6 +70,12 @@ dubbo:
# Seata 配置项 # Seata 配置项
seata: seata:
tx-service-group: default # Seata 事务组编号,用于 TC 集群名
# 服务配置项,对应 ServiceProperties 类
service:
# 虚拟组和分组的映射
vgroup-mapping:
default: default
# Seata 注册中心配置项 # Seata 注册中心配置项
registry: registry:
type: nacos # 注册中心类型 type: nacos # 注册中心类型
@ -77,3 +83,4 @@ seata:
serverAddr: ${spring.cloud.nacos.discovery.server-addr} # Nacos 服务地址 serverAddr: ${spring.cloud.nacos.discovery.server-addr} # Nacos 服务地址
namespace: # Nacos 命名空间 namespace: # Nacos 命名空间
cluster: default # 使用的 Seata 分组 cluster: default # 使用的 Seata 分组

View File

@ -66,10 +66,16 @@
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId> <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency> </dependency>
<!-- Transaction 相关 -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-alibaba-seata</artifactId>
</dependency>
<!-- MQ 相关 --> <!-- MQ 相关 -->
<dependency> <dependency>
<groupId>org.apache.rocketmq</groupId> <groupId>com.alibaba.cloud</groupId>
<artifactId>rocketmq-spring-boot-starter</artifactId> <artifactId>spring-cloud-starter-stream-rocketmq</artifactId>
</dependency> </dependency>
<!-- Job 相关 --> <!-- Job 相关 -->

View File

@ -56,6 +56,12 @@ dubbo:
# Seata 配置项 # Seata 配置项
seata: seata:
tx-service-group: default # Seata 事务组编号,用于 TC 集群名
# 服务配置项,对应 ServiceProperties 类
service:
# 虚拟组和分组的映射
vgroup-mapping:
default: default
# Seata 注册中心配置项 # Seata 注册中心配置项
registry: registry:
type: nacos # 注册中心类型 type: nacos # 注册中心类型

View File

@ -54,8 +54,8 @@
<!-- MQ 相关 --> <!-- MQ 相关 -->
<dependency> <dependency>
<groupId>org.apache.rocketmq</groupId> <groupId>com.alibaba.cloud</groupId>
<artifactId>rocketmq-spring-boot-starter</artifactId> <artifactId>spring-cloud-starter-stream-rocketmq</artifactId>
</dependency> </dependency>
<!-- 工具类相关 --> <!-- 工具类相关 -->

View File

@ -67,8 +67,8 @@
<!-- MQ 相关 --> <!-- MQ 相关 -->
<dependency> <dependency>
<groupId>org.apache.rocketmq</groupId> <groupId>com.alibaba.cloud</groupId>
<artifactId>rocketmq-spring-boot-starter</artifactId> <artifactId>spring-cloud-starter-stream-rocketmq</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>