Browse Source

REPORT-15700 设计器启动端口问题

bugfix/10.0
yaoh.wu 6 years ago
parent
commit
13e3b9f0d8
  1. 22
      designer-base/src/main/java/com/fr/design/utils/DesignerPort.java
  2. 2
      designer-realize/src/main/java/com/fr/start/module/PreStartActivator.java

22
designer-base/src/main/java/com/fr/design/utils/DesignerPort.java

@ -1,10 +1,26 @@
package com.fr.design.utils;
/**
* 为的就是能替换 DesignPort.class 实现多开,因此避免编译器常量编译展开优化
*/
public class DesignerPort {
private DesignerPort() {
}
public static final int MESSAGE_PORT = 51462;
public static final int DEBUG_MESSAGE_PORT = 51463;
/**
* 设计器端口避免编译期常量优化展开
*/
public static final int MESSAGE_PORT = getMessagePort();
/**
* 设计器端口避免编译期常量优化展开
*/
public static final int DEBUG_MESSAGE_PORT = getDebugMessagePort();
private static int getMessagePort() {
return 51462;
}
private static int getDebugMessagePort() {
return 51463;
}
}

2
designer-realize/src/main/java/com/fr/start/module/PreStartActivator.java

@ -70,8 +70,6 @@ public class PreStartActivator extends Activator {
private void checkDebugStart() {
if (isDebug()) {
setDebugEnv();
} else {
DesignUtils.setPort(DesignUtils.getPort());
}
}

Loading…
Cancel
Save