From 90653b72c0df302d1dda56042da165551aef1c9e Mon Sep 17 00:00:00 2001 From: beiwei30 Date: Tue, 22 May 2018 19:27:21 +0800 Subject: [PATCH] #1830: dbindex support in redis --- .../com/alibaba/dubbo/registry/redis/RedisRegistry.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dubbo-registry/dubbo-registry-redis/src/main/java/com/alibaba/dubbo/registry/redis/RedisRegistry.java b/dubbo-registry/dubbo-registry-redis/src/main/java/com/alibaba/dubbo/registry/redis/RedisRegistry.java index 6a997918abf..3c19f86899e 100644 --- a/dubbo-registry/dubbo-registry-redis/src/main/java/com/alibaba/dubbo/registry/redis/RedisRegistry.java +++ b/dubbo-registry/dubbo-registry-redis/src/main/java/com/alibaba/dubbo/registry/redis/RedisRegistry.java @@ -134,10 +134,12 @@ public RedisRegistry(URL url) { } if (StringUtils.isEmpty(password)) { this.jedisPools.put(address, new JedisPool(config, host, port, - url.getParameter(Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT))); + url.getParameter(Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT), null, + url.getParameter("db.index", 0))); } else { this.jedisPools.put(address, new JedisPool(config, host, port, - url.getParameter(Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT), password)); + url.getParameter(Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT), password, + url.getParameter("db.index", 0))); } }