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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章