Browse Source

Merge pull request #60 in DESIGN/design from ~NEIL/design-10:feature/10.0 to feature/10.0

* commit 'eeff4a204ad7f758de7fa2a153052e003cb46b1e':
  REPORT-8484 & REPORT-8476 设计器有几率启动404.
master
superman 7 years ago
parent
commit
64b7741ab6
  1. 9
      designer-base/src/com/fr/start/StartServer.java
  2. 3
      designer-realize/src/com/fr/start/Designer.java

9
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.stable.StringUtils;
import com.fr.start.server.TomcatHost; import com.fr.start.server.TomcatHost;
import javax.swing.*; import javax.swing.BorderFactory;
import java.awt.*; import javax.swing.JOptionPane;
import java.awt.BorderLayout;
import java.awt.Desktop;
import java.awt.Font;
import java.io.IOException; import java.io.IOException;
import java.net.URI; import java.net.URI;
import java.net.URISyntaxException; import java.net.URISyntaxException;
@ -121,10 +124,10 @@ public class StartServer {
tomcatHost.addAndStartLocalEnvHomeWebApp(); tomcatHost.addAndStartLocalEnvHomeWebApp();
} }
}
if (!tomcatHost.isStarted()) { if (!tomcatHost.isStarted()) {
tomcatHost.start(); tomcatHost.start();
} }
}
} catch (InterruptedException e) { } catch (InterruptedException e) {
FineLoggerFactory.getLogger().error(e.getMessage()); FineLoggerFactory.getLogger().error(e.getMessage());
} catch (Exception e) { } catch (Exception e) {

3
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.BaseUtils;
import com.fr.base.Env; import com.fr.base.Env;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.dav.LocalEnv;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.actions.core.ActionFactory; import com.fr.design.actions.core.ActionFactory;
import com.fr.design.actions.file.WebPreviewUtils; import com.fr.design.actions.file.WebPreviewUtils;
@ -89,9 +90,11 @@ public class Designer extends BaseDesigner {
//传递启动参数 //传递启动参数
designerRoot.setSingleton(StartupArgs.class, new StartupArgs(args)); designerRoot.setSingleton(StartupArgs.class, new StartupArgs(args));
designerRoot.start(); designerRoot.start();
if (FRContext.getCurrentEnv() instanceof LocalEnv) {
// 预启动一下 // 预启动一下
StartServer.start(); StartServer.start();
} }
}
public Designer(String[] args) { public Designer(String[] args) {
super(args); super(args);

Loading…
Cancel
Save