自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

SpringCloud 整合Seata 解決分布式事務(wù)(搭建+源碼)

開發(fā) 前端 分布式
本篇Spring Cloud整合Seata之前,你必須要了解一下Spring Cloud Alibaba與Spring Boot、Spring Cloud之間的版本對應(yīng)關(guān)系。

[[356529]]

 seata官網(wǎng):http://seata.io/zh-cn/

前言

在當(dāng)下微服務(wù)架構(gòu)比較火熱時,新一代微服務(wù)解決方案Spring Cloud Alibaba提供的開源分布式事務(wù)解決框架Seata無疑成為了我們在解決分布式事務(wù)時的首要之選,前面兩篇文章分別介紹了常見的分布式解決方案和成熟的框架以及關(guān)于Seata概念的入門介紹,沒有過分布式事務(wù)處理的小伙伴可以先有個大致的入門了解:

  • SpringCloud Alibaba微服務(wù)架構(gòu)(十一)- 常見分布式事務(wù)解決方案及理論基礎(chǔ)篇
  • SpringCloud Alibaba微服務(wù)架構(gòu)(十二)- 分布式事務(wù)解決框架之Seata概念入門篇

那么在本篇Spring Cloud整合Seata之前,你必須要了解一下Spring Cloud Alibaba與Spring Boot、Spring Cloud之間的版本對應(yīng)關(guān)系。

版本選擇: Spring Cloud Alibaba與Spring Boot、Spring Cloud版本對應(yīng)關(guān)系

一、版本要求

坑點1: 如果項目中使用了druid數(shù)據(jù)庫連接池,引入的是SpringBoot的Starter依賴druid-spring-boot-starter,那么需要把druid-spring-boot-starter依賴換成druid1.1.23,因為seata源碼中引入的druid依賴跟druid-spring-boot-starter的自動裝配類沖突了,沖突的情況下項目啟動出現(xiàn)異常,異常如下:

 

 

二、整合Seata環(huán)境配置

1. 下載seata-server-1.2.0和seata-1.2.0源碼

seate-server下載: https://seata.io/zh-cn/blog/download.html,下載我們需要使用的seata1.2壓縮包。

seata-1.2.0源碼下載: https://github.com/seata/seata/releases

在這里插入圖片描述

2. 創(chuàng)建undo_log日志表

在seata1.2源碼seata-1.2.0\script\client\at\db目錄下有提供針對mysql、oracle、postgresql這三種數(shù)據(jù)庫生成undo-log逆向日志回滾表的表創(chuàng)建腳本。

  • 在你項目的參與全局事務(wù)的數(shù)據(jù)庫中加入undo_log這張表。undo_log表腳本根據(jù)自身數(shù)據(jù)庫類型來選擇。
  1. -- for AT mode you must to init this sql for you business database. the seata server not need it. 
  2. CREATE TABLE IF NOT EXISTS `undo_log` 
  3.     `branch_id`     BIGINT(20)   NOT NULL COMMENT 'branch transaction id'
  4.     `xid`           VARCHAR(100) NOT NULL COMMENT 'global transaction id'
  5.     `context`       VARCHAR(128) NOT NULL COMMENT 'undo_log context,such as serialization'
  6.     `rollback_info` LONGBLOB     NOT NULL COMMENT 'rollback info'
  7.     `log_status`    INT(11)      NOT NULL COMMENT '0:normal status,1:defense status'
  8.     `log_created`   DATETIME(6)  NOT NULL COMMENT 'create datetime'
  9.     `log_modified`  DATETIME(6)  NOT NULL COMMENT 'modify datetime'
  10.     UNIQUE KEY `ux_undo_log` (`xid`, `branch_id`) 
  11. ) ENGINE = InnoDB 
  12.   AUTO_INCREMENT = 1 
  13.   DEFAULT CHARSET = utf8 COMMENT ='AT transaction mode undo table'

3.創(chuàng)建seata事務(wù)相關(guān)表

下載Seata1.2的源碼后解壓如上圖,目前支持mysql、oracle、postgresql這三種數(shù)據(jù)庫,上述三種腳本是針對Seata的Sever端在協(xié)調(diào)處理分布式事務(wù)時所需要的3張表,提供了不同數(shù)據(jù)庫的global_table表、branch_table表、lock_table表創(chuàng)建腳本,根據(jù)自身數(shù)據(jù)庫執(zhí)行對應(yīng)的sql腳本執(zhí)行即可。

這里以mysql為例,在你的mysql數(shù)據(jù)庫中創(chuàng)建名為seata的庫,并執(zhí)行以下sql,將會生成三張表:

  1. -- -------------------------------- The script used when storeMode is 'db' -------------------------------- 
  2. -- the table to store GlobalSession data 
  3. CREATE TABLE IF NOT EXISTS `global_table` 
  4.     `xid`                       VARCHAR(128) NOT NULL
  5.     `transaction_id`            BIGINT
  6.     `status`                    TINYINT      NOT NULL
  7.     `application_id`            VARCHAR(32), 
  8.     `transaction_service_group` VARCHAR(32), 
  9.     `transaction_name`          VARCHAR(128), 
  10.     `timeout`                   INT
  11.     `begin_time`                BIGINT
  12.     `application_data`          VARCHAR(2000), 
  13.     `gmt_create`                DATETIME, 
  14.     `gmt_modified`              DATETIME, 
  15.     PRIMARY KEY (`xid`), 
  16.     KEY `idx_gmt_modified_status` (`gmt_modified`, `status`), 
  17.     KEY `idx_transaction_id` (`transaction_id`) 
  18. ) ENGINE = InnoDB 
  19.   DEFAULT CHARSET = utf8; 
  20.  
  21. -- the table to store BranchSession data 
  22. CREATE TABLE IF NOT EXISTS `branch_table` 
  23.     `branch_id`         BIGINT       NOT NULL
  24.     `xid`               VARCHAR(128) NOT NULL
  25.     `transaction_id`    BIGINT
  26.     `resource_group_id` VARCHAR(32), 
  27.     `resource_id`       VARCHAR(256), 
  28.     `branch_type`       VARCHAR(8), 
  29.     `status`            TINYINT, 
  30.     `client_id`         VARCHAR(64), 
  31.     `application_data`  VARCHAR(2000), 
  32.     `gmt_create`        DATETIME(6), 
  33.     `gmt_modified`      DATETIME(6), 
  34.     PRIMARY KEY (`branch_id`), 
  35.     KEY `idx_xid` (`xid`) 
  36. ) ENGINE = InnoDB 
  37.   DEFAULT CHARSET = utf8; 
  38.  
  39. -- the table to store lock data 
  40. CREATE TABLE IF NOT EXISTS `lock_table` 
  41.     `row_key`        VARCHAR(128) NOT NULL
  42.     `xid`            VARCHAR(96), 
  43.     `transaction_id` BIGINT
  44.     `branch_id`      BIGINT       NOT NULL
  45.     `resource_id`    VARCHAR(256), 
  46.     `table_name`     VARCHAR(32), 
  47.     `pk`             VARCHAR(36), 
  48.     `gmt_create`     DATETIME, 
  49.     `gmt_modified`   DATETIME, 
  50.     PRIMARY KEY (`row_key`), 
  51.     KEY `idx_branch_id` (`branch_id`) 
  52. ) ENGINE = InnoDB 
  53.   DEFAULT CHARSET = utf8; 

4. 項目中引入seata依賴

4.1 如果微服務(wù)是SpringCloud

  1. <!-- 分布式事務(wù)seata包 --> 
  2. <!--seata begin--> 
  3. <dependency> 
  4.    <groupId>com.alibaba.cloud</groupId> 
  5.    <artifactId>spring-cloud-starter-alibaba-seata</artifactId> 
  6.    <version>2.1.3.RELEASE</version> 
  7.    <exclusions> 
  8.      <exclusion> 
  9.         <groupId>io.seata</groupId> 
  10.         <artifactId>seata-spring-boot-starter</artifactId> 
  11.      </exclusion>    
  12.    </exclusions> 
  13. </dependency> 
  14. <dependency> 
  15.     <groupId>io.seata</groupId> 
  16.     <artifactId>seata-spring-boot-starter</artifactId> 
  17.     <version>1.2.0</version> 
  18. </dependency> 
  19. <!--seata end--> 

4.2 如果微服務(wù)是Dubbo

  1. <dependency> 
  2.     <groupId>io.seata</groupId> 
  3.     <artifactId>seata-spring-boot-starter</artifactId> 
  4.     <version>1.2.0</version> 
  5. </dependency> 

5. 更改seata-server中的registry.conf

配置registry.conf注冊中心為nacos,配置nacos相關(guān)屬性參數(shù)。

  1. ##配置seata-server的注冊中心,支持file 、nacos 、eureka、redis、zk、consul、etcd3、sofa 
  2. registry { 
  3.   # file 、nacos 、eureka、redis、zk、consul、etcd3、sofa 
  4.   type = "nacos" 
  5.  
  6.   nacos { 
  7.     application = "seata-server" 
  8.     serverAddr = "127.0.0.1:8848" 
  9.     group = "SEATA_GROUP" 
  10.     namespace = "public" 
  11.     username = "nacos" 
  12.     cluster = "default" 
  13.     password = "nacos" 
  14.   } 
  15.    
  16.   file { 
  17.     name = "file.conf" 
  18.   } 
  19.  
  20. ##配置seata-server的配置中心,支持file、nacos 、apollo、zk、consul、etcd3 
  21. config { 
  22.   # file、nacos 、apollo、zk、consul、etcd3 
  23.   type = "nacos" 
  24.  
  25.   nacos { 
  26.     serverAddr = "127.0.0.1:8848" 
  27.     namespace = "public" 
  28.     group = "SEATA_GROUP" 
  29.     username = "nacos" 
  30.     password = "nacos" 
  31.   } 
  32.   
  33.   file { 
  34.     name = "file.conf" 
  35.   } 

6. 修改seata-server中的file.config

配置file.config的DB模式相關(guān)參數(shù)配置。

  1. ##配置seata-server的數(shù)據(jù)存儲方式,支持本地文檔和數(shù)據(jù)庫。 
  2. ## transaction log store, only used in seata-server 
  3. store { 
  4.   ## store mode: file、db、redis 
  5.   mode = "db" 
  6.  
  7.   ## file store property 
  8.   file { 
  9.     ## store location dir 
  10.     dir = "sessionStore" 
  11.     # branch session size , if exceeded first try compress lockkey, still exceeded throws exceptions 
  12.     maxBranchSessionSize = 16384 
  13.     # globe session size , if exceeded throws exceptions 
  14.     maxGlobalSessionSize = 512 
  15.     # file buffer size , if exceeded allocate new buffer 
  16.     fileWriteBufferCacheSize = 16384 
  17.     # when recover batch read size 
  18.     sessionReloadReadSize = 100 
  19.     # async, sync 
  20.     flushDiskMode = async 
  21.   } 
  22.  
  23.   ## database store property 
  24.   db { 
  25.     ## the implement of javax.sql.DataSource, such as DruidDataSource(druid)/BasicDataSource(dbcp)/HikariDataSource(hikari) etc. 
  26.     datasource = "druid" 
  27.     ## mysql/oracle/postgresql/h2/oceanbase etc. 
  28.     dbType = "mysql" 
  29.     driverClassName = "com.mysql.jdbc.Driver" 
  30.     url = "jdbc:mysql://127.0.0.1:3306/seata" 
  31.     user = "root" 
  32.     password = "root" 
  33.     minConn = 5 
  34.     maxConn = 30 
  35.     globalTable = "global_table" 
  36.     branchTable = "branch_table" 
  37.     lockTable = "lock_table" 
  38.     queryLimit = 100 
  39.     maxWait = 5000 
  40.   } 
  41.  
  42.   ## redis store property 
  43.   redis { 
  44.     host = "127.0.0.1" 
  45.     port = "6379" 
  46.     password = "" 
  47.     database = "0" 
  48.     minConn = 1 
  49.     maxConn = 10 
  50.     queryLimit = 100 
  51.   } 

7. 修改提交nacos腳本到nacos控制臺

運行你下載的nacos,并參考:https://github.com/seata/seata/tree/develop/script/config-center 下的config.txt文件并修改:

  1. service.vgroupMapping.my_test_tx_group=default 
  2. store.mode=db 
  3. store.db.datasource=druid 
  4. store.db.dbType=mysql 
  5. store.db.driverClassName=com.mysql.jdbc.Driver 
  6. store.db.url=jdbc:mysql://127.0.0.1:3306/seata?useUnicode=true 
  7. store.db.user=username 
  8. store.db.password=password 
  9. store.db.minConn=5 
  10. store.db.maxConn=30 
  11. store.db.globalTable=global_table 
  12. store.db.branchTable=branch_table 
  13. store.db.queryLimit=100 
  14. store.db.lockTable=lock_table 
  15. store.db.maxWait=5000 

運行倉庫:https://github.com/seata/seata/tree/develop/script/config-center/nacos 中提供的nacos腳本nacos-config.sh,將以上信息提交到nacos控制臺,如果有需要修改參數(shù),可直接通過登錄nacos控制臺修改。

操作如下圖:


8. application.yml配置

從官方github倉庫:https://github.com/seata/seata/tree/develop/script/client 拿到參考配置做修改,加到你項目的application.yml文件中。

  1. #Seata分布式事務(wù)配置(AT模式) 
  2. seata: 
  3.   enabled: true 
  4.   application-id: ${spring.application.name
  5.   #客戶端和服務(wù)端在同一個事務(wù)組 
  6.   tx-service-group: my_test_tx_group 
  7.   enable-auto-data-source-proxy: true 
  8.   service: 
  9.     vgroup-mapping: 
  10.       my_test_tx_group: default 
  11.   config: 
  12.     type: nacos 
  13.     nacos: 
  14.       namespace: "public" 
  15.       serverAddr: 127.0.0.1:8848 
  16.       group: SEATA_GROUP 
  17.       username: "nacos" 
  18.       password"nacos" 
  19.   #服務(wù)注冊到nacos 
  20.   registry: 
  21.     type: nacos 
  22.     nacos: 
  23.       application: seata-server 
  24.       server-addr: 127.0.0.1:8848 
  25.       group: SEATA_GROUP 
  26.       namespace: "public" 
  27.       username: "nacos" 
  28.       password"nacos" 
  29.       cluster: default 

9. 運行seata-server

啟動運行seata-server,成功后,運行自己的服務(wù)提供者,服務(wù)參與者。在全局事務(wù)調(diào)用者(發(fā)起全局事務(wù)的服務(wù))的接口上加入@GlobalTransactional注解

到此為止,整合SpringCloud整合seata1.2及seata1.2整合nacos的配置與注冊中心全部整合完成了。

三、項目準備

如果你經(jīng)過前面的步驟搭建Seata環(huán)境完成了,那么你可以嘗試一下啟動項目,控制臺無異常則搭建成功。

那么下面準備以Seata官方文檔上的一個經(jīng)典例子為題,模擬用戶下單,創(chuàng)建訂單同時扣減庫存數(shù)量這一過程中產(chǎn)生的分布式事務(wù)問題,然后使用Seata解決,正好使用以下Seata的特性。

1. 訂單服務(wù)

  • OrderController
  1. /** 
  2.  * @desc:  訂單服務(wù) 
  3.  * @author: cao_wencao 
  4.  * @date: 2020-09-22 23:27 
  5.  */ 
  6. @RestController 
  7. @Slf4j 
  8. @RequestMapping("/order"
  9. public class OrderController { 
  10.  
  11.     @Autowired 
  12.     private OrderServiceImpl orderService; 
  13.  
  14.     /** 
  15.      * 用戶購買下單,模擬全局事務(wù)提交 
  16.      * @param pid 
  17.      * @return 
  18.      */ 
  19.     @RequestMapping("/purchase/commit/{pid}"
  20.     public Order orderCommit(@PathVariable("pid"Integer pid) { 
  21.         return orderService.createOrderCommit(pid); 
  22.     } 
  23.  
  24.     /** 
  25.      * 用戶購買下單,模擬全局事務(wù)回滾 
  26.      * @param pid 
  27.      * @return 
  28.      */ 
  29.     @RequestMapping("/purchase/rollback/{pid}"
  30.     public Order orderRollback(@PathVariable("pid"Integer pid) { 
  31.         return orderService.createOrderRollback(pid); 
  32.     } 
  33.  
  • OrderServiceImpl
  1. /** 
  2.  * @desc
  3.  * @author: cao_wencao 
  4.  * @date: 2020-09-22 23:30 
  5.  */ 
  6. @Service 
  7. @Slf4j 
  8. public class OrderServiceImpl { 
  9.     @Autowired 
  10.     private OrderDao orderDao; 
  11.  
  12.     @Autowired 
  13.     private ProductService productService; 
  14.  
  15.     //用戶下單,模擬全局事務(wù)提交 
  16.     public Order createOrderCommit(Integer pid) { 
  17.         log.info("接收到{}號商品的下單請求,接下來調(diào)用商品微服務(wù)查詢此商品信息", pid); 
  18.  
  19.         //1 調(diào)用商品微服務(wù),查詢商品信息 
  20.         Product product = productService.findByPid(pid); 
  21.         log.info("查詢到{}號商品的信息,內(nèi)容是:{}", pid, JSON.toJSONString(product)); 
  22.  
  23.         //2 下單(創(chuàng)建訂單) 
  24.         Order order = new Order(); 
  25.         order.setUid(1); 
  26.         order.setUsername("測試用戶"); 
  27.         order.setPid(pid); 
  28.         order.setPname(product.getPname()); 
  29.         order.setPprice(product.getPprice()); 
  30.         order.setNumber(1); 
  31.         orderDao.save(order); 
  32.         log.info("創(chuàng)建訂單成功,訂單信息為{}", JSON.toJSONString(order)); 
  33.  
  34.         //3 扣庫存m 
  35.         productService.reduceInventoryCommit(pid, order.getNumber()); 
  36.  
  37.         return order
  38.     } 
  39.  
  40.     //用戶下單,模擬全局事務(wù)回滾 
  41.     @GlobalTransactional//全局事務(wù)控制 
  42.     public Order createOrderRollback(Integer pid) { 
  43.         log.info("接收到{}號商品的下單請求,接下來調(diào)用商品微服務(wù)查詢此商品信息", pid); 
  44.  
  45.         //1 調(diào)用商品微服務(wù),查詢商品信息 
  46.         Product product = productService.findByPid(pid); 
  47.         log.info("查詢到{}號商品的信息,內(nèi)容是:{}", pid, JSON.toJSONString(product)); 
  48.  
  49.         //2 下單(創(chuàng)建訂單) 
  50.         Order order = new Order(); 
  51.         order.setUid(1); 
  52.         order.setUsername("測試用戶"); 
  53.         order.setPid(pid); 
  54.         order.setPname(product.getPname()); 
  55.         order.setPprice(product.getPprice()); 
  56.         order.setNumber(1); 
  57.         orderDao.save(order); 
  58.         log.info("創(chuàng)建訂單成功,訂單信息為{}", JSON.toJSONString(order)); 
  59.  
  60.         //3 扣庫存m 
  61.         productService.reduceInventoryRollback(pid, order.getNumber()); 
  62.  
  63.         return order
  64.     } 
  65.  
  • 商品服務(wù)的Feign類ProductService
  1. /** 
  2.  * @desc
  3.  * @author: cao_wencao 
  4.  * @date: 2020-09-22 23:43 
  5.  */ 
  6. @FeignClient(value = "product-service",configuration = FeignRequestInterceptor.class) 
  7. public interface ProductService { 
  8.     //@FeignClient的value +  @RequestMapping的value值  其實就是完成的請求地址  "http://product-service/product/" + pid 
  9.     //指定請求的URI部分 
  10.     @RequestMapping("/product/product/{pid}"
  11.     Product findByPid(@PathVariable Integer pid); 
  12.  
  13.     //扣減庫存,模擬全局事務(wù)提交 
  14.     //參數(shù)一: 商品標識 
  15.     //參數(shù)二:扣減數(shù)量 
  16.     @RequestMapping("/product/reduceInventory/commit"
  17.     void reduceInventoryCommit(@RequestParam("pid"Integer pid, 
  18.                                @RequestParam("number"Integer number); 
  19.  
  20.     //扣減庫存,模擬全局事務(wù)回滾 
  21.     //參數(shù)一: 商品標識 
  22.     //參數(shù)二:扣減數(shù)量 
  23.     @RequestMapping("/product/reduceInventory/rollback"
  24.     void reduceInventoryRollback(@RequestParam("pid"Integer pid, 
  25.                          @RequestParam("number"Integer number); 
  26.  

2. 商品服務(wù)

  • ProductController
  1. /** 
  2.  * @desc
  3.  * @author: cao_wencao 
  4.  * @date: 2020-09-22 23:16 
  5.  */ 
  6. @RestController 
  7. @Slf4j 
  8. @RequestMapping("/product"
  9. public class ProductController { 
  10.  
  11.     @Autowired 
  12.     private ProductService productService; 
  13.  
  14.     /** 
  15.      * 扣減庫存,正常->模擬全局事務(wù)提交 
  16.      * @param pid 
  17.      * @param number 
  18.      */ 
  19.     @RequestMapping("/reduceInventory/commit"
  20.     public void reduceInventoryCommit(Integer pid, Integer number) { 
  21.         String token = ServletUtils.getRequest().getHeader("token"); 
  22.         log.info("從head請求頭透傳過來的值為token:"+ token); 
  23.         productService.reduceInventoryCommit(pid, number); 
  24.     } 
  25.  
  26.     /** 
  27.      * 扣減庫存,異常->模擬全局事務(wù)回滾 
  28.      * @param pid 
  29.      * @param number 
  30.      */ 
  31.     @RequestMapping("/reduceInventory/rollback"
  32.     public void reduceInventoryRollback(Integer pid, Integer number) { 
  33.         productService.reduceInventoryRollback(pid, number); 
  34.     } 
  35.  
  36.     //商品信息查詢 
  37.     @RequestMapping("/product/{pid}"
  38.     public Product product(@PathVariable("pid"Integer pid) { 
  39.         log.info("接下來要進行{}號商品信息的查詢", pid); 
  40.         Product product = productService.findByPid(pid); 
  41.         log.info("商品信息查詢成功,內(nèi)容為{}", JSON.toJSONString(product)); 
  42.         return product; 
  43.     } 
  • ProductService接口類
  1. /** 
  2.  * @desc:  商品接口 
  3.  * @author: cao_wencao 
  4.  * @date: 2020-09-22 23:18 
  5.  */ 
  6. public interface ProductService { 
  7.     //根據(jù)pid查詢商品信息 
  8.     Product findByPid(Integer pid); 
  9.  
  10.     //扣減庫存,正常->模擬全局事務(wù)提交 
  11.     void reduceInventoryCommit(Integer pid, Integer number); 
  12.  
  13.     //扣減庫存,異常->模擬全局事務(wù)回滾 
  14.     void reduceInventoryRollback(Integer pid, Integer number); 
  • ProductServiceImpl 接口實現(xiàn)類
  1. /** 
  2.  * @desc:  商品服務(wù)實現(xiàn)類 
  3.  * @author: cao_wencao 
  4.  * @date: 2020-09-22 23:20 
  5.  */ 
  6. @Service 
  7. public class ProductServiceImpl implements ProductService { 
  8.  
  9.     @Autowired 
  10.     private ProductDao productDao; 
  11.  
  12.     @Override 
  13.     public Product findByPid(Integer pid) { 
  14.         return productDao.findById(pid).get(); 
  15.     } 
  16.  
  17.     /** 
  18.      * 扣減庫存,正常->模擬全局事務(wù)提交 
  19.      * @param pid 
  20.      * @param number 
  21.      */ 
  22.     @Override 
  23.     public void reduceInventoryCommit(Integer pid, Integer number) { 
  24.         //查詢 
  25.         Product product = productDao.findById(pid).get(); 
  26.         //省略校驗 
  27.  
  28.         //內(nèi)存中扣減 
  29.         product.setStock(product.getStock() - number); 
  30.  
  31.         //保存扣減庫存 
  32.         productDao.save(product); 
  33.     } 
  34.  
  35.     /** 
  36.      * 扣減庫存,異常->模擬全局事務(wù)回滾 
  37.      * @param pid 
  38.      * @param number 
  39.      */ 
  40.     @Transactional(rollbackFor = Exception.class)  //服務(wù)提供方本地事務(wù)注解 
  41.     @Override 
  42.     public void reduceInventoryRollback(Integer pid, Integer number) { 
  43.         //查詢 
  44.         Product product = productDao.findById(pid).get(); 
  45.         //省略校驗 
  46.  
  47.         //內(nèi)存中扣減 
  48.         product.setStock(product.getStock() - number); 
  49.  
  50.         //模擬異常 
  51.         int i = 1 / 0; 
  52.  
  53.         //保存扣減庫存 
  54.         productDao.save(product); 
  55.     } 

四、參考文檔

seata官網(wǎng):

  • http://seata.io/zh-cn/

Seata常見問題:

  • http://seata.io/zh-cn/docs/overview/faq.html

Seata整合1.2教程:

  • https://www.bilibili.com/video/BV12Q4y1A7Nt

升級1.3教程:

  • https://www.bilibili.com/video/BV1Cf4y1X7vR
  • https: //mp.weixin.qq.com/s/2KSidJ72YsovpJ94P1aK1g

springcloud整合demo:

  • https://gitee.com/itCjb/spring-cloud-alibaba-seata-demo

五、完整源碼

  • https://github.com/Thinkingcao/SpringCloudLearning/tree/master/springcloud-seata

 

責(zé)任編輯:姜華 來源: Thinking曹
相關(guān)推薦

2022-06-27 08:21:05

Seata分布式事務(wù)微服務(wù)

2022-03-24 07:51:27

seata分布式事務(wù)Java

2023-07-26 08:25:02

2024-10-09 14:14:07

2022-06-21 08:27:22

Seata分布式事務(wù)

2023-08-17 10:23:07

擴展方案

2025-04-28 00:44:04

2022-10-26 17:28:41

分布式事務(wù)seata

2022-07-10 20:24:48

Seata分布式事務(wù)

2021-08-06 08:33:27

Springboot分布式Seata

2025-01-26 00:00:40

Seata分布式事務(wù)

2021-04-23 08:15:51

Seata XA AT

2023-11-06 13:15:32

分布式事務(wù)Seata

2024-08-19 09:05:00

Seata分布式事務(wù)

2022-01-12 10:02:02

TCC模式 Seata

2023-01-06 09:19:12

Seata分布式事務(wù)

2022-07-03 14:03:57

分布式Seata

2020-12-08 11:43:03

Spring Clou分布式Seata

2024-12-02 09:19:44

2025-04-29 04:00:00

分布式事務(wù)事務(wù)消息
點贊
收藏

51CTO技術(shù)棧公眾號