diff --git a/lib/commons-pool2-2.0.jar b/lib/commons-pool2-2.0.jar
new file mode 100644
index 0000000..be6d84f
Binary files /dev/null and b/lib/commons-pool2-2.0.jar differ
diff --git a/lib/finekit-10.0-20190830.jar b/lib/finekit-10.0.jar
similarity index 53%
rename from lib/finekit-10.0-20190830.jar
rename to lib/finekit-10.0.jar
index 49cbb9d..34ff820 100644
Binary files a/lib/finekit-10.0-20190830.jar and b/lib/finekit-10.0.jar differ
diff --git a/lib/jsch-0.1.55.jar b/lib/jsch-0.1.55.jar
new file mode 100644
index 0000000..c6fd21d
Binary files /dev/null and b/lib/jsch-0.1.55.jar differ
diff --git a/pom.xml b/pom.xml
index e4bb588..349f217 100644
--- a/pom.xml
+++ b/pom.xml
@@ -16,23 +16,29 @@
redis.clients
jedis
2.9.0
+ system
+ ${project.basedir}/lib/jedis-2.9.0.jar
- com.fr.core
- fine-core-sdk
- 10.0
+ org.apache.commons
+ commons-pool2
+ 2.0
+ system
+ ${project.basedir}/lib/commons-pool2-2.0.jar
- com.fr.report
- designer-base
- 10.0
+ com.jcraft
+ jsch
+ 0.1.55
+ system
+ ${project.basedir}/lib/jsch-0.1.55.jar
com.fanruan.api
finekit
- 1.0
+ 10.0
system
- ${project.basedir}/lib/finekit-10.0-20190830.jar.jar
+ ${project.basedir}/lib/finekit-10.0.jar
diff --git a/src/main/java/com/fr/plugin/db/redis/RedisConnectionImpl.java b/src/main/java/com/fr/plugin/db/redis/RedisConnectionImpl.java
index 4bbdcb8..a28166d 100755
--- a/src/main/java/com/fr/plugin/db/redis/RedisConnectionImpl.java
+++ b/src/main/java/com/fr/plugin/db/redis/RedisConnectionImpl.java
@@ -1,7 +1,7 @@
package com.fr.plugin.db.redis;
-import com.fanruan.api.design.ui.container.BasicBeanPane;
import com.fr.data.impl.Connection;
+import com.fr.design.beans.BasicBeanPane;
import com.fr.design.fun.impl.AbstractConnectionProvider;
import com.fr.plugin.db.redis.core.RedisDatabaseConnection;
import com.fr.plugin.db.redis.ui.RedisConnectionPane;
diff --git a/src/main/java/com/fr/plugin/db/redis/core/RedisDatabaseConnection.java b/src/main/java/com/fr/plugin/db/redis/core/RedisDatabaseConnection.java
index 5b229c5..8d9ff85 100755
--- a/src/main/java/com/fr/plugin/db/redis/core/RedisDatabaseConnection.java
+++ b/src/main/java/com/fr/plugin/db/redis/core/RedisDatabaseConnection.java
@@ -1,13 +1,13 @@
package com.fr.plugin.db.redis.core;
import com.fanruan.api.conf.HolderKit;
+import com.fanruan.api.data.open.BaseConnection;
import com.fanruan.api.i18n.I18nKit;
import com.fanruan.api.security.SecurityKit;
import com.fanruan.api.util.ArrayKit;
import com.fanruan.api.util.StringKit;
import com.fanruan.api.util.TypeKit;
import com.fr.config.holder.Conf;
-import com.fr.data.impl.AbstractDatabaseConnection;
import com.fr.data.impl.Connection;
import com.fr.plugin.db.redis.core.emb.Redis;
import com.fr.stable.xml.XMLPrintWriter;
@@ -16,7 +16,7 @@ import com.fr.stable.xml.XMLableReader;
import java.util.List;
import java.util.Set;
-public class RedisDatabaseConnection extends AbstractDatabaseConnection {
+public class RedisDatabaseConnection extends BaseConnection {
private static final int DEFAULT_REDIS_PORT = 6379;
@@ -71,11 +71,6 @@ public class RedisDatabaseConnection extends AbstractDatabaseConnection {
return RedisPool.getPool().getResource(getHost(), getPort(), getPassword());
}
- @Override
- public java.sql.Connection createConnection() throws Exception {
- return Connection.IGNORE;
- }
-
@Override
public String[] summary(String... args) {
if (ArrayKit.isEmpty(args)) {
diff --git a/src/main/java/com/fr/plugin/db/redis/core/RedisPool.java b/src/main/java/com/fr/plugin/db/redis/core/RedisPool.java
index 85cc3a2..1403111 100644
--- a/src/main/java/com/fr/plugin/db/redis/core/RedisPool.java
+++ b/src/main/java/com/fr/plugin/db/redis/core/RedisPool.java
@@ -1,20 +1,22 @@
package com.fr.plugin.db.redis.core;
+import com.fanruan.api.conf.ConfigurationKit;
+import com.fanruan.api.generic.Matcher;
+import com.fanruan.api.generic.Runner;
import com.fanruan.api.log.LogKit;
import com.fanruan.api.util.StringKit;
-import com.fr.config.holder.ConfigChangeListener;
+import com.fr.config.Configuration;
import com.fr.plugin.db.redis.core.emb.Redis;
import com.fr.plugin.db.redis.core.emb.impl.ProxyRedis;
import com.fr.plugin.db.redis.core.emb.impl.SimpleRedis;
import com.fr.plugin.db.redis.core.pool.RedisConnectionPoolConfig;
import com.fr.plugin.db.redis.core.pool.RedisConnectionProxyConfig;
-import com.fr.ssh.jsch.JSch;
-import com.fr.ssh.jsch.JSchException;
-import com.fr.ssh.jsch.Session;
-import com.fr.third.redis.clients.jedis.Jedis;
-import com.fr.third.redis.clients.jedis.JedisPool;
-import com.fr.third.redis.clients.jedis.JedisPoolConfig;
-import com.fr.transaction.ValidateProxy;
+import com.jcraft.jsch.JSch;
+import com.jcraft.jsch.JSchException;
+import com.jcraft.jsch.Session;
+import redis.clients.jedis.Jedis;
+import redis.clients.jedis.JedisPool;
+import redis.clients.jedis.JedisPoolConfig;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@@ -29,15 +31,15 @@ public class RedisPool {
private static RedisPool pool = new RedisPool();
static {
- ValidateProxy.getInstance().getValidateManager().registerListener(new ConfigChangeListener() {
+ ConfigurationKit.listenCacheChange(new Matcher>() {
@Override
- public void change() {
- pool.clearAll();
+ public boolean match(Class clazz) {
+ return RedisConnectionPoolConfig.class == clazz;
}
-
+ }, new Runner() {
@Override
- public boolean accept(Class clazz) {
- return RedisConnectionPoolConfig.class == clazz;
+ public void run() {
+ pool.clearAll();
}
});
}
@@ -79,8 +81,6 @@ public class RedisPool {
config.setMaxTotal(poolConfig.getMaxTotal());
//连接耗尽时是否阻塞, false报异常,true阻塞直到超时, 默认true
config.setBlockWhenExhausted(poolConfig.getBlockWhenExhausted());
- //设置的逐出策略类名, 默认DefaultEvictionPolicy(当连接超过最大空闲时间,或连接数超过最大空闲连接数)
- config.setEvictionPolicyClassName("com.fr.third.org.apache.commons.pool2.impl.DefaultEvictionPolicy");
//是否启用pool的jmx管理功能, 默认true
config.setJmxEnabled(true);
//MBean ObjectName = new ObjectName("org.apache.commons.pool2:type=GenericObjectPool,name=" + "pool" + i); 默认为"pool", JMX不熟,具体不知道是干啥的...默认就好.
@@ -109,7 +109,7 @@ public class RedisPool {
if (StringKit.isNotBlank(password)) {
return new JedisPool(config, host, port, poolConfig.getTimeout(), password);
} else {
- return new JedisPool(config, host, port, poolConfig.getTimeout());
+ return new JedisPool(config, host, port, poolConfig.getTimeout());
}
}
diff --git a/src/main/java/com/fr/plugin/db/redis/core/RedisScriptTableData.java b/src/main/java/com/fr/plugin/db/redis/core/RedisScriptTableData.java
index d0ab0a4..3032bb1 100644
--- a/src/main/java/com/fr/plugin/db/redis/core/RedisScriptTableData.java
+++ b/src/main/java/com/fr/plugin/db/redis/core/RedisScriptTableData.java
@@ -3,12 +3,12 @@ package com.fr.plugin.db.redis.core;
import com.fanruan.api.conf.HolderKit;
import com.fanruan.api.conf.xml.XmlHolderKit;
import com.fanruan.api.data.ConnectionKit;
+import com.fanruan.api.data.open.BaseTableData;
import com.fanruan.api.log.LogKit;
import com.fanruan.api.util.StringKit;
import com.fanruan.api.xml.XmlKit;
import com.fr.base.TableData;
import com.fr.config.holder.Conf;
-import com.fr.data.AbstractParameterTableData;
import com.fr.data.impl.Connection;
import com.fr.general.data.DataModel;
import com.fr.intelli.record.Focus;
@@ -28,7 +28,7 @@ import com.fr.stable.xml.XMLableReader;
* Created by richie on 2019-03-18
*/
@EnableMetrics
-public class RedisScriptTableData extends AbstractParameterTableData {
+public class RedisScriptTableData extends BaseTableData {
private static final long serialVersionUID = 1525853354993816818L;
diff --git a/src/main/java/com/fr/plugin/db/redis/core/RedisScriptTableDataModel.java b/src/main/java/com/fr/plugin/db/redis/core/RedisScriptTableDataModel.java
index 29267b0..863f3e1 100644
--- a/src/main/java/com/fr/plugin/db/redis/core/RedisScriptTableDataModel.java
+++ b/src/main/java/com/fr/plugin/db/redis/core/RedisScriptTableDataModel.java
@@ -1,6 +1,6 @@
package com.fr.plugin.db.redis.core;
-import com.fr.data.AbstractDataModel;
+import com.fanruan.api.data.open.BaseDataModel;
import com.fr.plugin.db.redis.core.emb.Redis;
import com.fr.plugin.db.redis.help.RedisClient;
import com.fr.plugin.db.redis.help.RedisClientSelector;
@@ -14,7 +14,7 @@ import java.util.List;
* @version 10.0
* Created by richie on 2019-03-18
*/
-public class RedisScriptTableDataModel extends AbstractDataModel {
+public class RedisScriptTableDataModel extends BaseDataModel {
private RedisDatabaseConnection mc;
private String script;
diff --git a/src/main/java/com/fr/plugin/db/redis/core/RedisTableData.java b/src/main/java/com/fr/plugin/db/redis/core/RedisTableData.java
index 5e9f591..e2393fb 100644
--- a/src/main/java/com/fr/plugin/db/redis/core/RedisTableData.java
+++ b/src/main/java/com/fr/plugin/db/redis/core/RedisTableData.java
@@ -3,12 +3,12 @@ package com.fr.plugin.db.redis.core;
import com.fanruan.api.conf.HolderKit;
import com.fanruan.api.conf.xml.XmlHolderKit;
import com.fanruan.api.data.ConnectionKit;
+import com.fanruan.api.data.open.BaseTableData;
import com.fanruan.api.log.LogKit;
import com.fanruan.api.util.StringKit;
import com.fanruan.api.xml.XmlKit;
import com.fr.base.TableData;
import com.fr.config.holder.Conf;
-import com.fr.data.AbstractParameterTableData;
import com.fr.data.impl.Connection;
import com.fr.general.data.DataModel;
import com.fr.intelli.record.Focus;
@@ -25,7 +25,7 @@ import com.fr.stable.xml.XMLableReader;
@EnableMetrics
-public class RedisTableData extends AbstractParameterTableData {
+public class RedisTableData extends BaseTableData {
private static final long serialVersionUID = 7017455818551800001L;
private Conf database = HolderKit.obj(null, Connection.class);
diff --git a/src/main/java/com/fr/plugin/db/redis/core/RedisTableDataModel.java b/src/main/java/com/fr/plugin/db/redis/core/RedisTableDataModel.java
index 06a99e2..1f67703 100755
--- a/src/main/java/com/fr/plugin/db/redis/core/RedisTableDataModel.java
+++ b/src/main/java/com/fr/plugin/db/redis/core/RedisTableDataModel.java
@@ -1,9 +1,9 @@
package com.fr.plugin.db.redis.core;
+import com.fanruan.api.data.open.BaseDataModel;
import com.fanruan.api.log.LogKit;
-import com.fanruan.api.runtime.PluginKit;
import com.fanruan.api.util.StringKit;
-import com.fr.data.AbstractDataModel;
+import com.fr.plugin.context.PluginContexts;
import com.fr.plugin.db.redis.core.emb.Redis;
import com.fr.plugin.db.redis.core.visit.VisitorFactory;
import com.fr.stable.ParameterProvider;
@@ -11,12 +11,12 @@ import com.fr.stable.script.CalculatorProvider;
import java.util.List;
-public class RedisTableDataModel extends AbstractDataModel {
+public class RedisTableDataModel extends BaseDataModel {
private String[] columnNames;
private List> data;
public RedisTableDataModel(CalculatorProvider calculator, ParameterProvider[] ps, RedisDatabaseConnection mc, int dbIndex, String query, String script, int rowCount) {
- if (PluginKit.isCurrentPluginAvailable()) {
+ if (PluginContexts.currentContext().isAvailable()) {
initRedisData(calculator, ps, mc, dbIndex, query, script, rowCount);
} else {
throw new RuntimeException("Redis Plugin License Expired!");
diff --git a/src/main/java/com/fr/plugin/db/redis/core/emb/Redis.java b/src/main/java/com/fr/plugin/db/redis/core/emb/Redis.java
index 5582443..3547dde 100644
--- a/src/main/java/com/fr/plugin/db/redis/core/emb/Redis.java
+++ b/src/main/java/com/fr/plugin/db/redis/core/emb/Redis.java
@@ -1,6 +1,6 @@
package com.fr.plugin.db.redis.core.emb;
-import com.fr.third.redis.clients.jedis.Jedis;
+import redis.clients.jedis.Jedis;
/**
* @author richie
diff --git a/src/main/java/com/fr/plugin/db/redis/core/emb/impl/ProxyRedis.java b/src/main/java/com/fr/plugin/db/redis/core/emb/impl/ProxyRedis.java
index f7f528d..80f8ddc 100644
--- a/src/main/java/com/fr/plugin/db/redis/core/emb/impl/ProxyRedis.java
+++ b/src/main/java/com/fr/plugin/db/redis/core/emb/impl/ProxyRedis.java
@@ -1,8 +1,8 @@
package com.fr.plugin.db.redis.core.emb.impl;
import com.fr.plugin.db.redis.core.emb.Redis;
-import com.fr.ssh.jsch.Session;
-import com.fr.third.redis.clients.jedis.Jedis;
+import redis.clients.jedis.Jedis;
+import com.jcraft.jsch.Session;
/**
* @author richie
diff --git a/src/main/java/com/fr/plugin/db/redis/core/emb/impl/SimpleRedis.java b/src/main/java/com/fr/plugin/db/redis/core/emb/impl/SimpleRedis.java
index db55482..7d03fc1 100644
--- a/src/main/java/com/fr/plugin/db/redis/core/emb/impl/SimpleRedis.java
+++ b/src/main/java/com/fr/plugin/db/redis/core/emb/impl/SimpleRedis.java
@@ -1,7 +1,7 @@
package com.fr.plugin.db.redis.core.emb.impl;
import com.fr.plugin.db.redis.core.emb.Redis;
-import com.fr.third.redis.clients.jedis.Jedis;
+import redis.clients.jedis.Jedis;
/**
* @author richie
diff --git a/src/main/java/com/fr/plugin/db/redis/core/visit/AbstractVisitor.java b/src/main/java/com/fr/plugin/db/redis/core/visit/AbstractVisitor.java
index a7082dd..94e7bda 100644
--- a/src/main/java/com/fr/plugin/db/redis/core/visit/AbstractVisitor.java
+++ b/src/main/java/com/fr/plugin/db/redis/core/visit/AbstractVisitor.java
@@ -5,7 +5,7 @@ import com.fr.plugin.db.redis.core.DataWrapper;
import com.fr.plugin.db.redis.core.RedisConstants;
import com.fr.stable.ParameterProvider;
import com.fr.stable.script.CalculatorProvider;
-import com.fr.third.redis.clients.jedis.Jedis;
+import redis.clients.jedis.Jedis;
/**
* Created by richie on 2017/5/2.
diff --git a/src/main/java/com/fr/plugin/db/redis/core/visit/Visitor.java b/src/main/java/com/fr/plugin/db/redis/core/visit/Visitor.java
index 8ab1ef8..2c81f16 100644
--- a/src/main/java/com/fr/plugin/db/redis/core/visit/Visitor.java
+++ b/src/main/java/com/fr/plugin/db/redis/core/visit/Visitor.java
@@ -3,7 +3,7 @@ package com.fr.plugin.db.redis.core.visit;
import com.fr.plugin.db.redis.core.DataWrapper;
import com.fr.stable.ParameterProvider;
import com.fr.stable.script.CalculatorProvider;
-import com.fr.third.redis.clients.jedis.Jedis;
+import redis.clients.jedis.Jedis;
import java.util.List;
diff --git a/src/main/java/com/fr/plugin/db/redis/core/visit/VisitorFactory.java b/src/main/java/com/fr/plugin/db/redis/core/visit/VisitorFactory.java
index e7c170a..966a18a 100644
--- a/src/main/java/com/fr/plugin/db/redis/core/visit/VisitorFactory.java
+++ b/src/main/java/com/fr/plugin/db/redis/core/visit/VisitorFactory.java
@@ -13,7 +13,7 @@ import com.fr.plugin.db.redis.core.visit.impl.SetVisitor;
import com.fr.plugin.db.redis.core.visit.impl.ZRangeVisitor;
import com.fr.stable.ParameterProvider;
import com.fr.stable.script.CalculatorProvider;
-import com.fr.third.redis.clients.jedis.Jedis;
+import redis.clients.jedis.Jedis;
import java.util.ArrayList;
import java.util.List;
diff --git a/src/main/java/com/fr/plugin/db/redis/core/visit/impl/GetVisitor.java b/src/main/java/com/fr/plugin/db/redis/core/visit/impl/GetVisitor.java
index be61962..610551a 100644
--- a/src/main/java/com/fr/plugin/db/redis/core/visit/impl/GetVisitor.java
+++ b/src/main/java/com/fr/plugin/db/redis/core/visit/impl/GetVisitor.java
@@ -3,7 +3,7 @@ package com.fr.plugin.db.redis.core.visit.impl;
import com.fr.plugin.db.redis.core.visit.AbstractVisitor;
import com.fr.stable.ParameterProvider;
import com.fr.stable.script.CalculatorProvider;
-import com.fr.third.redis.clients.jedis.Jedis;
+import redis.clients.jedis.Jedis;
import java.util.ArrayList;
import java.util.List;
diff --git a/src/main/java/com/fr/plugin/db/redis/core/visit/impl/HashGetVisitor.java b/src/main/java/com/fr/plugin/db/redis/core/visit/impl/HashGetVisitor.java
index 2702029..2975b48 100644
--- a/src/main/java/com/fr/plugin/db/redis/core/visit/impl/HashGetVisitor.java
+++ b/src/main/java/com/fr/plugin/db/redis/core/visit/impl/HashGetVisitor.java
@@ -3,7 +3,7 @@ package com.fr.plugin.db.redis.core.visit.impl;
import com.fr.plugin.db.redis.core.visit.AbstractVisitor;
import com.fr.stable.ParameterProvider;
import com.fr.stable.script.CalculatorProvider;
-import com.fr.third.redis.clients.jedis.Jedis;
+import redis.clients.jedis.Jedis;
import java.util.ArrayList;
import java.util.List;
diff --git a/src/main/java/com/fr/plugin/db/redis/core/visit/impl/HashKeysVisitor.java b/src/main/java/com/fr/plugin/db/redis/core/visit/impl/HashKeysVisitor.java
index b58e383..66a693e 100644
--- a/src/main/java/com/fr/plugin/db/redis/core/visit/impl/HashKeysVisitor.java
+++ b/src/main/java/com/fr/plugin/db/redis/core/visit/impl/HashKeysVisitor.java
@@ -3,7 +3,7 @@ package com.fr.plugin.db.redis.core.visit.impl;
import com.fr.plugin.db.redis.core.visit.AbstractVisitor;
import com.fr.stable.ParameterProvider;
import com.fr.stable.script.CalculatorProvider;
-import com.fr.third.redis.clients.jedis.Jedis;
+import redis.clients.jedis.Jedis;
import java.util.ArrayList;
import java.util.List;
diff --git a/src/main/java/com/fr/plugin/db/redis/core/visit/impl/HashMGetVisitor.java b/src/main/java/com/fr/plugin/db/redis/core/visit/impl/HashMGetVisitor.java
index 0728e6d..b17c543 100644
--- a/src/main/java/com/fr/plugin/db/redis/core/visit/impl/HashMGetVisitor.java
+++ b/src/main/java/com/fr/plugin/db/redis/core/visit/impl/HashMGetVisitor.java
@@ -3,7 +3,7 @@ package com.fr.plugin.db.redis.core.visit.impl;
import com.fr.plugin.db.redis.core.visit.AbstractVisitor;
import com.fr.stable.ParameterProvider;
import com.fr.stable.script.CalculatorProvider;
-import com.fr.third.redis.clients.jedis.Jedis;
+import redis.clients.jedis.Jedis;
import java.util.ArrayList;
import java.util.List;
diff --git a/src/main/java/com/fr/plugin/db/redis/core/visit/impl/HashVisitor.java b/src/main/java/com/fr/plugin/db/redis/core/visit/impl/HashVisitor.java
index 0f50786..62d84fe 100644
--- a/src/main/java/com/fr/plugin/db/redis/core/visit/impl/HashVisitor.java
+++ b/src/main/java/com/fr/plugin/db/redis/core/visit/impl/HashVisitor.java
@@ -3,7 +3,7 @@ package com.fr.plugin.db.redis.core.visit.impl;
import com.fr.plugin.db.redis.core.visit.AbstractVisitor;
import com.fr.stable.ParameterProvider;
import com.fr.stable.script.CalculatorProvider;
-import com.fr.third.redis.clients.jedis.Jedis;
+import redis.clients.jedis.Jedis;
import java.util.ArrayList;
import java.util.List;
diff --git a/src/main/java/com/fr/plugin/db/redis/core/visit/impl/KeysVisitor.java b/src/main/java/com/fr/plugin/db/redis/core/visit/impl/KeysVisitor.java
index 4999d36..e597ef5 100644
--- a/src/main/java/com/fr/plugin/db/redis/core/visit/impl/KeysVisitor.java
+++ b/src/main/java/com/fr/plugin/db/redis/core/visit/impl/KeysVisitor.java
@@ -3,7 +3,7 @@ package com.fr.plugin.db.redis.core.visit.impl;
import com.fr.plugin.db.redis.core.visit.AbstractVisitor;
import com.fr.stable.ParameterProvider;
import com.fr.stable.script.CalculatorProvider;
-import com.fr.third.redis.clients.jedis.Jedis;
+import redis.clients.jedis.Jedis;
import java.util.ArrayList;
import java.util.List;
diff --git a/src/main/java/com/fr/plugin/db/redis/core/visit/impl/ListVisitor.java b/src/main/java/com/fr/plugin/db/redis/core/visit/impl/ListVisitor.java
index b7b7c87..5600249 100644
--- a/src/main/java/com/fr/plugin/db/redis/core/visit/impl/ListVisitor.java
+++ b/src/main/java/com/fr/plugin/db/redis/core/visit/impl/ListVisitor.java
@@ -4,7 +4,7 @@ import com.fr.base.TableData;
import com.fr.plugin.db.redis.core.visit.AbstractVisitor;
import com.fr.stable.ParameterProvider;
import com.fr.stable.script.CalculatorProvider;
-import com.fr.third.redis.clients.jedis.Jedis;
+import redis.clients.jedis.Jedis;
import java.util.ArrayList;
import java.util.List;
diff --git a/src/main/java/com/fr/plugin/db/redis/core/visit/impl/MGetVisitor.java b/src/main/java/com/fr/plugin/db/redis/core/visit/impl/MGetVisitor.java
index 8206ecb..2528b38 100644
--- a/src/main/java/com/fr/plugin/db/redis/core/visit/impl/MGetVisitor.java
+++ b/src/main/java/com/fr/plugin/db/redis/core/visit/impl/MGetVisitor.java
@@ -4,7 +4,7 @@ import com.fanruan.api.util.ArrayKit;
import com.fr.plugin.db.redis.core.visit.AbstractVisitor;
import com.fr.stable.ParameterProvider;
import com.fr.stable.script.CalculatorProvider;
-import com.fr.third.redis.clients.jedis.Jedis;
+import redis.clients.jedis.Jedis;
import java.util.ArrayList;
import java.util.List;
diff --git a/src/main/java/com/fr/plugin/db/redis/core/visit/impl/SetVisitor.java b/src/main/java/com/fr/plugin/db/redis/core/visit/impl/SetVisitor.java
index 57867db..b602658 100644
--- a/src/main/java/com/fr/plugin/db/redis/core/visit/impl/SetVisitor.java
+++ b/src/main/java/com/fr/plugin/db/redis/core/visit/impl/SetVisitor.java
@@ -3,7 +3,7 @@ package com.fr.plugin.db.redis.core.visit.impl;
import com.fr.plugin.db.redis.core.visit.AbstractVisitor;
import com.fr.stable.ParameterProvider;
import com.fr.stable.script.CalculatorProvider;
-import com.fr.third.redis.clients.jedis.Jedis;
+import redis.clients.jedis.Jedis;
import java.util.ArrayList;
import java.util.List;
diff --git a/src/main/java/com/fr/plugin/db/redis/core/visit/impl/ZRangeVisitor.java b/src/main/java/com/fr/plugin/db/redis/core/visit/impl/ZRangeVisitor.java
index ade180e..e3eb2d5 100644
--- a/src/main/java/com/fr/plugin/db/redis/core/visit/impl/ZRangeVisitor.java
+++ b/src/main/java/com/fr/plugin/db/redis/core/visit/impl/ZRangeVisitor.java
@@ -4,8 +4,8 @@ import com.fr.base.TableData;
import com.fr.plugin.db.redis.core.visit.AbstractVisitor;
import com.fr.stable.ParameterProvider;
import com.fr.stable.script.CalculatorProvider;
-import com.fr.third.redis.clients.jedis.Jedis;
-import com.fr.third.redis.clients.jedis.Tuple;
+import redis.clients.jedis.Jedis;
+import redis.clients.jedis.Tuple;
import java.util.ArrayList;
import java.util.List;
diff --git a/src/main/java/com/fr/plugin/db/redis/help/client/BaseRedisClient.java b/src/main/java/com/fr/plugin/db/redis/help/client/BaseRedisClient.java
index 632ba56..6c2931b 100644
--- a/src/main/java/com/fr/plugin/db/redis/help/client/BaseRedisClient.java
+++ b/src/main/java/com/fr/plugin/db/redis/help/client/BaseRedisClient.java
@@ -4,7 +4,7 @@ import com.fanruan.api.log.LogKit;
import com.fr.plugin.db.redis.help.ScriptBridge;
import com.fr.plugin.db.redis.help.RedisClient;
-import com.fr.third.redis.clients.jedis.Jedis;
+import redis.clients.jedis.Jedis;
/**
* @author richie
diff --git a/src/main/java/com/fr/plugin/db/redis/help/client/NashornFiles.java b/src/main/java/com/fr/plugin/db/redis/help/client/NashornFiles.java
new file mode 100644
index 0000000..54f59d5
--- /dev/null
+++ b/src/main/java/com/fr/plugin/db/redis/help/client/NashornFiles.java
@@ -0,0 +1,36 @@
+package com.fr.plugin.db.redis.help.client;
+
+import com.fanruan.api.log.LogKit;
+import com.fanruan.api.macro.EncodeConstants;
+import com.fanruan.api.util.IOKit;
+import com.fr.plugin.db.redis.help.ScriptBridge;
+
+import javax.script.ScriptEngine;
+import java.io.InputStream;
+
+/**
+ * @author richie
+ * @version 10.0
+ * Created by richie on 2019-09-17
+ */
+public class NashornFiles {
+
+ private ScriptEngine scriptEngine;
+
+ public NashornFiles(ScriptEngine scriptEngine) {
+ this.scriptEngine = scriptEngine;
+ }
+
+ @ScriptBridge
+ public void require(String filePath) {
+ InputStream in = IOKit.read(filePath);
+ if (in != null) {
+ try {
+ String text = IOKit.inputStream2String(in, EncodeConstants.ENCODING_UTF_8);
+ scriptEngine.eval(text);
+ } catch (Exception e) {
+ LogKit.error(e.getMessage(), e);
+ }
+ }
+ }
+}
diff --git a/src/main/java/com/fr/plugin/db/redis/help/client/RedisNashornClient.java b/src/main/java/com/fr/plugin/db/redis/help/client/RedisNashornClient.java
index 50aec29..9aea761 100644
--- a/src/main/java/com/fr/plugin/db/redis/help/client/RedisNashornClient.java
+++ b/src/main/java/com/fr/plugin/db/redis/help/client/RedisNashornClient.java
@@ -5,7 +5,7 @@ import com.fr.base.TableData;
import com.fr.plugin.db.redis.core.emb.Redis;
import com.fr.plugin.db.redis.help.Console;
import com.fr.plugin.db.redis.help.ScriptBridge;
-import com.fr.third.redis.clients.jedis.Jedis;
+import redis.clients.jedis.Jedis;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineFactory;
@@ -27,7 +27,7 @@ public class RedisNashornClient extends BaseRedisClient