springcloud+eureka+feign+seata 示例項目

本示例項目使用
jdk-1.8
springboot-2.1.8.RELEASE
springcloud-Greenwich.SR2
druid-1.1.10
mybatis-spring-boot-starter-2.0.0
spring-cloud-alibaba-seata-2.2.0.RELEASE
seata-all-1.0.0

之前搭建的時候使用的是
springboot-1.5.11.RELEASE
springcloud-Dalston.SR4
seata-spring-boot-starter-1.0.0
seata-all-1.0.0
但是沒有成功,具體原因後期會補上

模塊列表:
父項目: seata-demo (包含seata-server-1.0.0,已配置好,解壓即可使用)
註冊: seata-eureka
實體: seata-domain
接口: seata-spi
訂單: seata-order(包含數據庫order表)
庫存: seata-inventory(包含數據庫inventory表)
賬務: seata-account(包含數據庫account表)
入口: seata-web

啓動項目之前在inventory表中插入一條記錄
insert into inventory (product_id, amount, created_at) values ('1',1000,now());

在InventoryServiceImpl.java註釋掉代碼來測試插入成功案例,打開註釋代碼來測試回滾案例

 

示例項目地址

https://github.com/ChesterZheng/springcloud-seata-demo

發佈了4 篇原創文章 · 獲贊 0 · 訪問量 699
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章