Integration SpringBoot + Apache Dubbo + Seata
参考资料: https://github.com/seata/seata-samples
create database (默认为:fescar_demo)
导入sql文件:seata-demo.sql
download page:https://github.com/seata/seata/releases
download and unzip seata-server,cd the bin dictory, and run
sudo sh seata-server.sh
start seata-dubbo-account、seata-dubbo-order、seata-dubbo-storage、seata-dubbo-business
use curl:
curl localhost:8081/buy\?userId=U100001\&commodityCode=C201901140001\&orderCount=2
enter samples-business , change BusinessServiceImpl, uncomment the following code :
if (!flag) {
throw new RuntimeException("测试抛异常后,分布式事务回滚!");
}
restart the samples-business module, and execute the step 4.