ListenQ commented on issue #625: URL: https://github.com/apache/incubator-seata-samples/issues/625#issuecomment-2017042691
>  > > **报错信息"service.vgroupMapping.${spring.application.name}-fescar-service-group configuration item is required"** > > > 1. `tx-service-group`从配置文件`spring.cloud.alibaba.seata.tx-service-group`获取 > > 2. 否则默认读取`${spring.appilcaton.name}-fescar-service-group`作为`tx-service-group`的值 > > > **报错信息“service.vgroupMapping.${spring.cloud.seata.tx-service-group} configuration item is required”** > > > > 1. `service.vgroupMapping.${spring.cloud.seata.tx-service-group}`配置项从配置文件的`seata.service.vgroupMapping.${spring.cloud.seata.tx-service-group}`获取。 > > 2. 如果配置`spring.cloud.alibaba.seata.service.vgroupMapping.${spring.cloud.seata.tx-service-group}`将不能被seata的配置类扫描到 > > > **报错信息"service.default.grouplist or service.grouplist.default configuration item is required"** > > > > 1. `GrouplistDataId`有新旧两种配置格式,Seata 1.7.0都兼容,分别是旧的配置项`seata.service.default.grouplist`,和新的配置项`seata.service.grouplist.default` > > 2. `GrouplistDataId`配置项从配置文件的`seata.service.default.grouplist`或`seata.service.grouplist.default`获取 > > 3. 如果配置`spring.cloud.alibaba.seata.service.default.grouplist`将不能被seata的配置类扫描到 > > ```yaml > server: > port: 2001 > > spring: > application: > name: seata-order-service > cloud: > alibaba: > seata: > tx-service-group: order-tx-group > nacos: > discovery: > server-addr: 172.25.254.137:8848 > > # seata的tc地址通过nacos服务注册中心获取 > # 为避免nacos配置混乱seata的配置信息通过本地application.yaml获取 > # 如果seata client需要使用nacos配置中心,只需开启seata.config下的相关配置即可,(namespace,group,dataId)坐标唯一确定一个配置文件 > seata: > registry: > type: nacos > # 从Nacos获取tc的服务器地址 > nacos: > server-addr: 172.25.254.137:8848 > namespace: 7aed383e-88da-466b-9153-9ba78255a921 > group: SEATA_GROUP > applicatoin: seata-server > username: nacos > password: nacos > # config: > # type: nacos > # nacos: > # server-addr: 172.25.254.137:8848 > # namespace: da64003c-9c4a-489e-8c7f-fbbf511284df > # group: SEATA_GROUP > # username: nacos > # password: nacos > # data-id: seataServer.properties > service: > # 事务组与tc服务cluster的映射关系 > # 键为tx-service-group的值,将该自定义事务映射到seata-server服务默认的集群(默认为default) > # 需要匹配tc的application.yaml的seata.registry.nacos.cluster的值 > # 首先程序中配置了事务分组(GlobalTransactionScanner 构造方法的txServiceGroup参数),程序会通过用户配置的配置中心去寻找service.vgroupMapping事务分组配置项,取得配置项的值就是TC集群的名称。拿到集群名称程序通过一定的前后缀+集群名称去构造服务名,各配置中心的服务名实现不同。拿到服务名去相应的注册中心去拉取相应服务名的服务列表,获得后端真实的TC服务列表。 > vgroupMapping: > order-tx-group: DEFAULT > # seata.service.grouplist仅在seata.registry.type = file时生效 > # 为了Seata Server(TC)在Nacos服务注册中心的集群名与其它微服务集群名全大写的命名规则保持一致,在创建Seata Server(TC)的配置项seata.registry.cluster就自定义配置为全大写的DEFAULT > # grouplist: > # DEFAULT: 172.25.254.137:8091 > ``` > > > Seata Server 1.5.0版本开始,配置文件改为application.yml,同时向下兼容register.conf和file.conf两个配置文件。 > > **本案例完全使用application.yml配置文件,无需创建配置[register.conf和file.conf](https://github.com/seata/seata/tree/develop/script/client/conf)。** --- 请问 Seata Server 2.0.0版本,seata.tx-service-group 值是可以设置多个吗?或者不设置会怎样? ``` seata: application-id: springboot-dubbo-seata-business tx-service-group: my_test_tx_group ``` 参数配置文档也没有说明这个参数 https://seata.apache.org/zh-cn/docs/user/configurations/#%E9%99%84%E5%BD%95-1 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@seata.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@seata.apache.org For additional commands, e-mail: dev-h...@seata.apache.org