apache/incubator-seata#3777 https://juejin.cn/post/6976191318305275912
https://github.com/hashicorp/learn-consul-docker/tree/main/datacenter-deploy-secure https://learn.hashicorp.com/tutorials/consul/docker-compose-datacenter
docker-compose up -d
[需要mysql 初始化完成,在启动seata,不然会报错]
sh consul-config.sh -h localhost -p 8500
docker-compose restart seata
- server.port=28080
- 配置registry / config type为consul
- server.port=18080
- 配置registry / config type为consul
curl --location --request POST 'http://localhost:28080/business/buy' \
--header 'Content-Type: application/json' \
--data-raw '{
"userId": 1,
"productId": 1,
"count": 1
}'
curl --location --request POST 'http://localhost:28080/business/buy-rollback' \
--header 'Content-Type: application/json' \
--data-raw '{
"userId": 1,
"productId": 1,
"count": 1
}'