From eeff4a204ad7f758de7fa2a153052e003cb46b1e Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Fri, 1 Jun 2018 11:09:35 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-8484=20&=20REPORT-8476=20=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E6=9C=89=E5=87=A0=E7=8E=87=E5=90=AF=E5=8A=A8?= =?UTF-8?q?404.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer-base/src/com/fr/start/StartServer.java | 13 ++++++++----- designer-realize/src/com/fr/start/Designer.java | 7 +++++-- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/designer-base/src/com/fr/start/StartServer.java b/designer-base/src/com/fr/start/StartServer.java index 828547fd4..7ab65e549 100644 --- a/designer-base/src/com/fr/start/StartServer.java +++ b/designer-base/src/com/fr/start/StartServer.java @@ -23,8 +23,11 @@ import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; import com.fr.start.server.TomcatHost; -import javax.swing.*; -import java.awt.*; +import javax.swing.BorderFactory; +import javax.swing.JOptionPane; +import java.awt.BorderLayout; +import java.awt.Desktop; +import java.awt.Font; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; @@ -121,9 +124,9 @@ public class StartServer { tomcatHost.addAndStartLocalEnvHomeWebApp(); } - } - if (!tomcatHost.isStarted()) { - tomcatHost.start(); + if (!tomcatHost.isStarted()) { + tomcatHost.start(); + } } } catch (InterruptedException e) { FineLoggerFactory.getLogger().error(e.getMessage()); diff --git a/designer-realize/src/com/fr/start/Designer.java b/designer-realize/src/com/fr/start/Designer.java index 7ee3e6f35..ae382d2fa 100644 --- a/designer-realize/src/com/fr/start/Designer.java +++ b/designer-realize/src/com/fr/start/Designer.java @@ -3,6 +3,7 @@ package com.fr.start; import com.fr.base.BaseUtils; import com.fr.base.Env; import com.fr.base.FRContext; +import com.fr.dav.LocalEnv; import com.fr.design.DesignerEnvManager; import com.fr.design.actions.core.ActionFactory; import com.fr.design.actions.file.WebPreviewUtils; @@ -89,8 +90,10 @@ public class Designer extends BaseDesigner { //传递启动参数 designerRoot.setSingleton(StartupArgs.class, new StartupArgs(args)); designerRoot.start(); - // 预启动一下 - StartServer.start(); + if (FRContext.getCurrentEnv() instanceof LocalEnv) { + // 预启动一下 + StartServer.start(); + } } public Designer(String[] args) {