From 7d2597ec7912a4d9f840c473f9ac7244e82a419a Mon Sep 17 00:00:00 2001 From: richie Date: Mon, 26 Aug 2019 21:09:35 +0800 Subject: [PATCH] =?UTF-8?q?engine=E5=90=8D=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin.xml | 3 ++- src/main/java/com/fr/plugin/db/redis/help/Console.java | 4 ++++ .../java/com/fr/plugin/db/redis/help/RedisClientSelector.java | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/plugin.xml b/plugin.xml index b1a2a00..abca42d 100755 --- a/plugin.xml +++ b/plugin.xml @@ -3,12 +3,13 @@ com.fr.solution.plugin.db.redis.v10 yes - 6.1 + 6.2 10.0 2018-11-29 richie [2019-08-26]不支持V8引擎的机器上使用JDK内置的脚本引擎(仅支持ES5语法)。
[2019-03-21]现在可以通过跳板服务连接redis。
[2019-03-18]修复连接没有释放的问题。
diff --git a/src/main/java/com/fr/plugin/db/redis/help/Console.java b/src/main/java/com/fr/plugin/db/redis/help/Console.java index 38d4813..ba3bbe7 100644 --- a/src/main/java/com/fr/plugin/db/redis/help/Console.java +++ b/src/main/java/com/fr/plugin/db/redis/help/Console.java @@ -23,4 +23,8 @@ public class Console { FineLoggerFactory.getLogger().error(message == null ? null : message.toString()); } + @ScriptBridge + public String engine() { + return RedisClientSelector.isSupportJ2v8() ? "V8" : "Nashorn"; + } } diff --git a/src/main/java/com/fr/plugin/db/redis/help/RedisClientSelector.java b/src/main/java/com/fr/plugin/db/redis/help/RedisClientSelector.java index 97284b1..c3aa5b6 100644 --- a/src/main/java/com/fr/plugin/db/redis/help/RedisClientSelector.java +++ b/src/main/java/com/fr/plugin/db/redis/help/RedisClientSelector.java @@ -14,7 +14,7 @@ public class RedisClientSelector { private final static boolean SUPPORT_J2V8 = isSupportJ2v8(); - private static boolean isSupportJ2v8() { + public static boolean isSupportJ2v8() { V8 v8; try { v8 = V8.createV8Runtime();