集成seata,启动服务端的时候,一直报错no available service ‘null’ found, please make sure registry config correct,百度了半天,都不是,最后发现,在yml没有配置seata在nacos中的namespace
错误的yml
正确的yml
seata:
enabled: true
application-id: ${spring.application.name} #微服务应用名称
tx-service-group: tomato_goods_tx_group #此处配置自定义的seata事务分组名称
enable-auto-data-source-proxy: true #开启数据库代理
registry:
type: nacos
nacos:
application: seata-server
server-addr: 1.14.xx.xx:8848 #注册中心nacos地址
group: DEFAULT_GROUP #分组名 对应服务器端配置
cluster: default #默认集群名
namespace: xxx-7a23-xxx-aa37-9ac4267c7e5d #命名空间 对应nacos中配置中心seata
config:
type: nacos
nacos:
server-addr: 1.14.xx.xx:8848 #配置中心nacos地址
group: DEFAULT_GROUP #分组名 对应服务器端配置
namespace: xxxxx-xxx-4a67-aa37-9ac4267c7e5d #命名空间 对应nacos中配置中心seata
service:
vgroup-mapping:
tomato_goods_tx_group: default #事务分组
我真傻,真的