- 注意事项,我这里只列了配置文件,其他配置参考官网
server服务端的配置是啥,client的配置必须保持一致,不然会有问题,yaml文件配置中有很多是默认的
1、官方文档地址
[nacos (seata.io)](http://seata.io/zh-cn/docs/user/registry/nacos.html)
# nacos注册中心
```yaml
client客户端#application.yaml
seata:
registry:
type: nacos
nacos:
application: seata-server
server-addr: 127.0.0.1:8848
group : "SEATA_GROUP"
namespace: ""
username: "nacos"
password: "nacos"
```
```yaml
server服务端的registry.conf
registry {
type = "nacos"
nacos {
application = "seata-server"
serverAddr = "127.0.0.1:8848"
group = "SEATA_GROUP"
namespace = ""
cluster = "default"
username = ""
password = ""
}
}
```
# Eureka 注册中心
```yaml
client客户端#application.yaml
seata:
tx-service-group: my_test_tx_group
service:
vgroup-mapping:
my_test_tx_group: seata-server # 此处配置对应Server端配置registry.eureka.application的值
registry:
type: eureka
eureka:
service-url: http://localhost:8761/eureka
weight: 1
```
```yaml
registry {
type = "eureka"
eureka {
serviceUrl = "http://localhost:8761/eureka"
application = "seata-server"
weight = "1"
}
}
```