1.部署环境准备

① 10.11.0.215 服务器
② seata-server.tar.gz 安装包

2.Seata-Server操作步骤

①下载解压安装包
②编写启动命令

  1. 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

  1. <!--seata-->
  2. <dependency>
  3. <groupId>io.seata</groupId>
  4. <artifactId>seata-spring-boot-starter</artifactId>
  5. <version>1.3.0</version>
  6. </dependency>
  7. <dependency>
  8. <groupId>com.alibaba.cloud</groupId>
  9. <artifactId>spring-cloud-starter-alibaba-seata</artifactId>
  10. <exclusions>
  11. <exclusion>
  12. <groupId>io.seata</groupId>
  13. <artifactId>seata-spring-boot-starter</artifactId>
  14. </exclusion>
  15. </exclusions>
  16. </dependency>

4.nacos编写seata-client.yaml文件

用到分布式事务的服务配置

  1. seata:
  2. tx-service-group: yurun_dev_tx_group
  3. service:
  4. grouplist:
  5. default: 10.11.0.215:8091
  6. vgroup-mapping:
  7. mall-group: default