From f8e8663b846879f4180883009843ca9d9a297452 Mon Sep 17 00:00:00 2001 From: Harrison Date: Mon, 27 Jun 2022 17:34:51 +0800 Subject: [PATCH 1/3] =?UTF-8?q?REPORT-74595=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=20EnvDetectConfig=20=E8=A7=84=E8=8C=83=20?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=86=99=E5=85=A5=E6=97=B6=E6=9C=BA=E4=B8=BA?= =?UTF-8?q?=E9=BB=98=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/env/detect/base/EnvDetectorConfig.java | 7 ------- 1 file changed, 7 deletions(-) diff --git a/designer-base/src/main/java/com/fr/env/detect/base/EnvDetectorConfig.java b/designer-base/src/main/java/com/fr/env/detect/base/EnvDetectorConfig.java index caafdbe464..eda399efad 100644 --- a/designer-base/src/main/java/com/fr/env/detect/base/EnvDetectorConfig.java +++ b/designer-base/src/main/java/com/fr/env/detect/base/EnvDetectorConfig.java @@ -1,6 +1,5 @@ package com.fr.env.detect.base; -import com.fr.design.DesignerEnvManager; import com.fr.stable.xml.XMLPrintWriter; import com.fr.stable.xml.XMLable; import com.fr.stable.xml.XMLableReader; @@ -29,12 +28,6 @@ public class EnvDetectorConfig implements XMLable { public void setEnabled(boolean enabled) { this.enabled = enabled; - save(); - } - - private void save() { - - DesignerEnvManager.getEnvManager(false).saveXMLFile(); } @Override From b4be5db14d691b643f238d1acaec2448eb203cf9 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 28 Jun 2022 20:56:49 +0800 Subject: [PATCH 2/3] =?UTF-8?q?REPORT-74500=20=E3=80=90FVS=E3=80=91?= =?UTF-8?q?=E6=89=93=E5=BC=80fvs=E7=9A=84=E6=97=B6=E5=80=99=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E5=9B=BD=E9=99=85=E5=8C=96=E5=B9=B6=E9=87=8D=E5=90=AF?= =?UTF-8?q?=EF=BC=8C=E8=AE=BE=E8=AE=A1=E5=99=A8=E5=8D=A1=E6=AD=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/start/server/FineEmbedServer.java | 12 +++++++++++- .../java/com/fr/start/module/DesignerStartup.java | 2 +- .../module/optimized/TenantDBAdapter4Designer.java | 6 ++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/start/server/FineEmbedServer.java b/designer-base/src/main/java/com/fr/start/server/FineEmbedServer.java index e977884427..e70804c4dc 100644 --- a/designer-base/src/main/java/com/fr/start/server/FineEmbedServer.java +++ b/designer-base/src/main/java/com/fr/start/server/FineEmbedServer.java @@ -7,11 +7,17 @@ import com.fr.module.ModuleContext; * Created by juhaoyu on 2018/6/6. */ public abstract class FineEmbedServer { + + /** + * 是否正在启动中 + */ + private static volatile boolean onStarting = false; public synchronized static void start() { - + onStarting = true; EventDispatcher.fire(EmbedServerEvent.BeforeStart); ModuleContext.getModule(FineEmbedServerActivator.class).start(); + onStarting = false; EventDispatcher.fire(EmbedServerEvent.AfterStart); } @@ -26,4 +32,8 @@ public abstract class FineEmbedServer { return ModuleContext.getModule(FineEmbedServerActivator.class).isRunning(); } + + public static boolean isOnStarting() { + return onStarting; + } } diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java b/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java index 4149753f72..fd8bd93079 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java @@ -125,7 +125,7 @@ public class DesignerStartup extends Activator { @Override public void on(Event event, Null param) { // 有可能被插件之类的 强制启动了 判断下 - if (FineEmbedServer.isRunning()) { + if (FineEmbedServer.isRunning() || FineEmbedServer.isOnStarting()) { return; } startEmbeddedServer(); diff --git a/designer-realize/src/main/java/com/fr/start/module/optimized/TenantDBAdapter4Designer.java b/designer-realize/src/main/java/com/fr/start/module/optimized/TenantDBAdapter4Designer.java index ad2485d690..9321a56a97 100644 --- a/designer-realize/src/main/java/com/fr/start/module/optimized/TenantDBAdapter4Designer.java +++ b/designer-realize/src/main/java/com/fr/start/module/optimized/TenantDBAdapter4Designer.java @@ -4,6 +4,7 @@ import com.fr.config.dao.DaoSelectorFactory; import com.fr.config.dao.swicter.DaoSwitcher; import com.fr.design.DesignerEnvManager; import com.fr.event.Event; +import com.fr.event.EventDispatcher; import com.fr.event.Listener; import com.fr.event.Null; import com.fr.exit.ConfigToPropMigrator; @@ -25,6 +26,7 @@ public class TenantDBAdapter4Designer extends TenantDBAdapter { @Override public void on(Event event, Null param) { TenantDBAdapter4Designer.super.start(); + afterStart(); } }); @@ -32,7 +34,7 @@ public class TenantDBAdapter4Designer extends TenantDBAdapter { @Override public void on(Event event, Null param) { if (DaoSelectorFactory.getDaoSelector().useCacheDao()) { - beforeEmbedServerStart(); + EventDispatcher.fire(LazyStartupEvent.INSTANCE); } } }); @@ -42,7 +44,7 @@ public class TenantDBAdapter4Designer extends TenantDBAdapter { } } - private void beforeEmbedServerStart() { + private void afterStart() { DesignerEnvManager.getEnvManager().setPropertiesUsable(false); DaoSwitcher.executeSwitch(); ConfigToPropMigrator.getInstance().deletePropertiesCache(); From 4a9fa255d14677502d2c288ecaa27aec74fe79be Mon Sep 17 00:00:00 2001 From: rinoux Date: Thu, 30 Jun 2022 16:25:05 +0800 Subject: [PATCH 3/3] =?UTF-8?q?REPORT-74603=20=E5=B5=8C=E5=85=A5=E5=BC=8F?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E7=9A=84=E9=99=90=E5=88=B6=E8=AE=BF?= =?UTF-8?q?=E9=97=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/data/datapane/connect/ConnectionListPane.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java index e4deae04ba..93f2938556 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java @@ -1,5 +1,6 @@ package com.fr.design.data.datapane.connect; +import com.fr.base.TemplateUtils; import com.fr.config.RemoteConfigEvent; import com.fr.data.core.db.JDBCSecurityChecker; import com.fr.data.impl.Connection; @@ -201,7 +202,7 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh Connection connection = connectionBean.getConnection(); if (connection instanceof JDBCDatabaseConnection) { try { - JDBCSecurityChecker.checkURL(((JDBCDatabaseConnection) connection).getURL()); + JDBCSecurityChecker.checkURL(TemplateUtils.render(((JDBCDatabaseConnection) connection).getURL())); JDBCSecurityChecker.checkValidationQuery(((JDBCDatabaseConnection) connection).getDbcpAttr().getValidationQuery()); } catch (SQLException e) { throw new SQLException(Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Invalid_Config", connectionBean.getName()) + ", " + e.getMessage(), e.getCause());