You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/10/10 10:57:41 UTC
[GitHub] [incubator-shardingsphere] huangjian888 commented on a change in
pull request #3209: Nacos RegistryCenter Added Namespace Property
Configuration
huangjian888 commented on a change in pull request #3209: Nacos RegistryCenter Added Namespace Property Configuration
URL: https://github.com/apache/incubator-shardingsphere/pull/3209#discussion_r333455395
##########
File path: sharding-orchestration/sharding-orchestration-reg/sharding-orchestration-reg-nacos/src/main/java/org/apache/shardingsphere/orchestration/reg/nacos/NacosRegistryCenter.java
##########
@@ -46,7 +46,10 @@
@Override
public void init(final RegistryCenterConfiguration config) {
try {
- configService = NacosFactory.createConfigService(config.getServerLists());
+ Properties properties = new Properties();
+ properties.put("serverAddr", config.getServerLists());
+ properties.put("namespace", !Strings.isNullOrEmpty(config.getNamespace()) ? config.getNamespace() : "");
+ configService = NacosFactory.createConfigService(properties);
} catch (NacosException e) {
Review comment:
ok!
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services