1 Star 0 Fork 1

May / TCC-Transation-starter

forked from wuze / TCC-Transation-starter 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

TCC-Transation-starter

介绍

基于TCC解决方案的分布式事务框架

前期配置

1、解压项目,使用maven安装项目

安装方法可参考:https://gitee.com/white-whoring-monster-cxk/netty-springboot.git

2、在项目中引入依赖

img.png

3、配置dbconfig.properties文件

image-20221021141109986

4、新建dbconfig.properties文件中的数据库,并导入表sql:comsumer_log.sql和provider_log.sql

image-20221021141526305

image-20221021141607568

简单使用

1、在事务发起方添加注解TCC

image-20221021102245031

2、补充补偿方法

image-20221021101840583

3、事务接收方

image-20221021102357844

4、事务接收方补偿方法

image-20221021102446064

5、无异常状况

image-20221021103238260

image-20221021103316441

image-20221021103118434

image-20221021103138543

6、出现异常

image-20221021141337881

image-20221021141342141

image-20221021141248849

image-20221021141311212

image-20221021141321139

测试项目链接:https://gitee.com/white-whoring-monster-cxk/tcc-transation-test.git

有时候会出现幂等性问题需要自己解决,或者将dubbo重试次数改为0次

空文件

简介

基于TCC分布式事务解决方案设计的框架 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mt_chen/tcc-transation-starter.git
git@gitee.com:mt_chen/tcc-transation-starter.git
mt_chen
tcc-transation-starter
TCC-Transation-starter
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891