1.部署环境准备
① 10.11.0.215 服务器
② seata-server.tar.gz 安装包
2.Seata-Server操作步骤
①下载解压安装包
②编写启动命令
nohup /home/software/seata-server/seata/bin/seata-server.sh -h 10.11.0.215 -m file >log.out 2>&1 &
3.项目pom文件准备
使用到seata的都需要引入,后期应该写个yurun-common-seata
<!--seata-->
<dependency>
<groupId>io.seata</groupId>
<artifactId>seata-spring-boot-starter</artifactId>
<version>1.3.0</version>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-seata</artifactId>
<exclusions>
<exclusion>
<groupId>io.seata</groupId>
<artifactId>seata-spring-boot-starter</artifactId>
</exclusion>
</exclusions>
</dependency>
4.nacos编写seata-client.yaml文件
用到分布式事务的服务配置
seata:
tx-service-group: yurun_dev_tx_group
service:
grouplist:
default: 10.11.0.215:8091
vgroup-mapping:
mall-group: default