diff --git a/plugins/riot/src/main/java/com/redis/riot/AbstractRedisCommand.java b/plugins/riot/src/main/java/com/redis/riot/AbstractRedisCommand.java index 03ca95dd..b71686dd 100644 --- a/plugins/riot/src/main/java/com/redis/riot/AbstractRedisCommand.java +++ b/plugins/riot/src/main/java/com/redis/riot/AbstractRedisCommand.java @@ -15,7 +15,7 @@ public abstract class AbstractRedisCommand extends AbstractJobCommand { @Override protected void execute() throws Exception { - redisContext = RedisContext.of(redisArgs.getUri(), redisArgs); + redisContext = RedisContext.of(redisArgs); redisContext.afterPropertiesSet(); try { super.execute(); diff --git a/plugins/riot/src/main/java/com/redis/riot/AbstractRedisExportCommand.java b/plugins/riot/src/main/java/com/redis/riot/AbstractRedisExportCommand.java index 391916a6..351e69d6 100644 --- a/plugins/riot/src/main/java/com/redis/riot/AbstractRedisExportCommand.java +++ b/plugins/riot/src/main/java/com/redis/riot/AbstractRedisExportCommand.java @@ -23,7 +23,7 @@ public abstract class AbstractRedisExportCommand extends AbstractExportCommand { @Override protected RedisContext sourceRedisContext() { - return RedisContext.of(redisArgs.getUri(), redisArgs); + return RedisContext.of(redisArgs); } protected ItemProcessor, Map> mapProcessor() { diff --git a/plugins/riot/src/main/java/com/redis/riot/AbstractRedisImportCommand.java b/plugins/riot/src/main/java/com/redis/riot/AbstractRedisImportCommand.java index ef04608f..1e282230 100644 --- a/plugins/riot/src/main/java/com/redis/riot/AbstractRedisImportCommand.java +++ b/plugins/riot/src/main/java/com/redis/riot/AbstractRedisImportCommand.java @@ -9,7 +9,7 @@ public abstract class AbstractRedisImportCommand extends AbstractImportCommand { @Override protected RedisContext targetRedisContext() { - return RedisContext.of(redisArgs.getUri(), redisArgs); + return RedisContext.of(redisArgs); } public RedisArgs getRedisArgs() { diff --git a/plugins/riot/src/main/java/com/redis/riot/RedisContext.java b/plugins/riot/src/main/java/com/redis/riot/RedisContext.java index e87a4325..546f4317 100644 --- a/plugins/riot/src/main/java/com/redis/riot/RedisContext.java +++ b/plugins/riot/src/main/java/com/redis/riot/RedisContext.java @@ -173,4 +173,10 @@ public RedisContext clientResources(ClientResources clientResources) { return this; } + public static RedisContext of(RedisArgs args) { + RedisContext context = of(args.getUri(), args); + context.sslOptions(args.getSslArgs().sslOptions()); + return context; + } + }