apache / incubator-seata

:fire: Seata is an easy-to-use, high-performance, open source distributed transaction solution.
https://seata.apache.org/
Apache License 2.0
25.34k stars 8.78k forks source link

seata 在读取yml 配置时驼峰命令的问题 #2334

Open Expried opened 4 years ago

Expried commented 4 years ago

我的环境是 JDK1.8 SpringBoot-2.1.8.RELEASE SpringCloud-Greenwich.SR3 seata-server-1.1 seata-spring-boot-starte-1.1 以下是配置文件: seata: tx-service-group: my_test_tx_group enable-auto-data-source-proxy: true application-id: ${spring.application.name} config: type: springCloudConfig service: disable-global-transaction: false vgroup-mapping: my_test_tx_group: default grouplist: default: 127.0.0.1:8091 enable-degrade: false registry: type: eureka eureka: application: default service-url: http://localhost:1001/eureka weight: 1 错误日志为: no available service 'null' found, please make sure registry config correct 获取的配置参数key:seata.service.vgroup-mapping.my_test_tx_group 实际在yml中的配置为:seata.service.vgroupMapping.my_test_tx_group image

slievrly commented 4 years ago

@Expried please debug check ServiceProperties.java#vgroupMapping value.

Expried commented 4 years ago

image 问题中的表述有误 代码中获取配置文件的key:seata.service.vgroupMapping.my_test_tx_group 实际在yml中的配置为:seata.service.vgroup-mapping.my_test_tx_group