# Script usage demo
![Since 1.2.0](https://img.shields.io/badge/Since%20-1.2.0-orange.svg?style=flat-square)
## important attributes
you only need to follow the instructions below and keep the corresponding configuration in 'config.txt' to run. For more configuration information, please visit [seata.io](https://seata.io/)
| server | client |
| ------------------------ | ------------------------------------------------------------ |
| store.mode: file,db | config.type: file、nacos 、apollo、zk、consul、etcd3、custom |
| #only db: | #only file: |
| store.db.driverClassName | service.default.grouplist |
| store.db.url | #All: |
| store.db.user | service.vgroupMapping.my_test_tx_group |
| store.db.password | service.disableGlobalTransaction |
## Nacos
shell:
```bash
sh ${SEATAPATH}/script/config-center/nacos/nacos-config.sh -h localhost -p 8848 -g SEATA_GROUP -t 5a3c7d6c-f497-4d68-a71a-2e5e3340b3ca -u username -w password
```
Parameter Description:
-h: host, the default value is localhost.
-p: port, the default value is 8848.
-g: Configure grouping, the default value is 'SEATA_GROUP'.
-t: Tenant information, corresponding to the namespace ID field of Nacos, the default value is ''.
-u: username, nacos 1.2.0+ on permission control, the default value is ''.
-w: password, nacos 1.2.0+ on permission control, the default value is ''.
python:
```bash
python ${SEATAPATH}/script/config-center/nacos/nacos-config.py localhost:8848
```
## Apollo
```bash
sh ${SEATAPATH}/script/config-center/apollo/apollo-config.sh -h localhost -p 8070 -e DEV -a seata-server -c default -n application -d apollo -r apollo -t 3aa026fc8435d0fc4505b345b8fa4578fb646a2c
```
Parameter Description:
-h: host, the default value is localhost.
-p: port, the default value is 8070.
-e: Managed configuration environment, the default value is DEV.
-a: AppId to which the namespace belongs, the default value is seata-server.
-c: Managed configuration cluster name, Generally, you can pass in default. If it is a special cluster, just pass in the name of the corresponding cluster,the default value is default.
-n: Name of the managed namespace, If the format is not properties, you need to add a suffix name, such as sample.yml, the default value is application.
-d: The creator of the item, in the format of a domain account, which is the User ID of the sso system.
-r: Publisher, domain account, note: if namespace.lock.switch in ApolloConfigDB.ServerConfig is set to true (default is false), Then the environment does not allow the publisher and editor to be the same person. So if the editor is zhangsan, the publisher can no longer be zhangsan.
-t: Apollo admin creates third-party applications in http://{portal_address}/open/manage.html, It is best to check whether this AppId has been created before creation. After successful creation, a token will be generated.
For details of the above parameter descriptions, please see:
https://github.com/ctripcorp/apollo/wiki/Apollo%E5%BC%80%E6%94%BE%E5%B9%B3%E5%8F%B0
## Consul
```bash
sh ${SEATAPATH}/script/config-center/consul/consul-config.sh -h localhost -p 8500
```
Parameter Description:
-h: host, the default value is localhost.
-p: port, the default value is 8500.
## Etcd3
```bash
sh ${SEATAPATH}/script/config-center/etcd3/etcd3-config.sh -h localhost -p 2379
```
Parameter Description:
-h: host, the default value is localhost.
-p: port, the default value is 2379.
## ZK
```bash
sh ${SEATAPATH}/script/config-center/zk/zk-config.sh -h localhost -p 2181 -z "/Users/zhangchenghui/zookeeper-3.4.14"
```
Parameter Description:
-h: host, the default value is localhost.
-p: port, the default value is 2181.
-z: zk path.
没有合适的资源?快使用搜索试试~ 我知道了~
最新版本SpringCloud+seata+nacos实现全局事物处理的demo案例
共88个文件
sql:14个
java:14个
class:14个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 5 下载量 2 浏览量
2022-04-06
11:58:07
上传
评论
收藏 156.98MB ZIP 举报
温馨提示
版本:springcloud 2021.0.1,springboot 2.6.4,seata 1.4.2,nacos 2.0.3 (其他所有依赖版本均为最新mybatis-plus,fegin等等......) 模拟订单和库存的一个简单案例实现,注册到nacos配置中心,通过feign远程调用模拟异常进行全局事物回滚。 内含sql文件,nacos、seata安装包以及对应seata配置所需的script脚本(也可自行官网下载) ...
资源推荐
资源详情
资源评论
收起资源包目录
seata-nacos-springcloud-demo.zip (88个子文件)
springcloud-seata-nacos-demo-02
pom.xml 3KB
target
classes
com
benjamin
utils
MyBatisPlusAuto.class 7KB
generated
seata-stock
pom.xml 2KB
seata-stock.iml 17KB
target
classes
application.yml 1KB
com
benjamin
stock
SeataStockApplication.class 990B
mapper
StockMapper.class 309B
controller
StockController.class 2KB
service
IStockService.class 322B
impl
StockServiceImpl.class 711B
entity
Stock.class 1KB
mappers
StockMapper.xml 217B
generated-sources
annotations
src
test
java
main
resources
application.yml 1KB
mappers
StockMapper.xml 217B
java
com
benjamin
stock
SeataStockApplication.java 771B
mapper
StockMapper.java 278B
controller
StockController.java 1KB
service
IStockService.java 279B
impl
StockServiceImpl.java 489B
entity
Stock.java 611B
springcloud-seata-nacos-demo-02.iml 7KB
src
test
java
main
resources
java
com
benjamin
utils
MyBatisPlusAuto.java 4KB
seata-order
pom.xml 3KB
target
classes
application.yml 1KB
com
benjamin
order
SeataOrderApplication.class 990B
api
FeignStockService.class 680B
mapper
OrderMapper.class 309B
controller
OrderController.class 2KB
service
IOrderService.class 322B
impl
OrderServiceImpl.class 711B
entity
Order.class 2KB
mappers
OrderMapper.xml 217B
generated-sources
annotations
src
test
java
main
resources
application.yml 1KB
mappers
OrderMapper.xml 217B
java
com
benjamin
order
api
FeignStockService.java 676B
SeataOrderApplication.java 771B
mapper
OrderMapper.java 278B
controller
OrderController.java 1KB
service
IOrderService.java 279B
impl
OrderServiceImpl.java 489B
entity
Order.java 680B
seata-order.iml 18KB
nacos、seata软件压缩包
nacos-server-2.0.3.zip 112.15MB
seata-server-1.4.2.zip 44.7MB
sql
seata-order.sql 2KB
seata.sql 4KB
seata-stock.sql 2KB
script
client
saga
db
oracle.sql 2KB
mysql.sql 4KB
postgresql.sql 2KB
h2.sql 3KB
db2.sql 2KB
conf
file.conf 2KB
registry.conf 2KB
at
db
oracle.sql 698B
mysql.sql 828B
postgresql.sql 644B
spring
application.properties 5KB
application.yml 3KB
config-center
consul
consul-config.sh 2KB
config.txt 3KB
zk
zk-config.sh 2KB
nacos
nacos-config.py 1KB
nacos-config.sh 3KB
etcd3
etcd3-config.sh 2KB
apollo
apollo-config.sh 5KB
README.md 4KB
server
config
file.properties 1KB
file.conf 2KB
file.yml 2KB
registry.yml 2KB
registry.conf 2KB
registry.properties 2KB
docker-compose
docker-compose.yaml 193B
db
oracle.sql 2KB
mysql.sql 2KB
postgresql.sql 2KB
kubernetes
seata-server.yaml 927B
helm
seata-server
templates
service.yaml 423B
tests
test-connection.yaml 397B
deployment.yaml 2KB
NOTES.txt 1KB
_helpers.tpl 2KB
Chart.yaml 93B
.helmignore 342B
values.yaml 224B
logstash
config
logstash-kafka.conf 271B
logstash-logback.conf 353B
共 88 条
- 1
hah杨大仙
- 粉丝: 1w+
- 资源: 2
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
前往页