fix:runMode修改
parent
94b39b4f6d
commit
770a25907e
|
@ -57,7 +57,7 @@
|
|||
<plugin>
|
||||
<groupId>com.gitee.starblues</groupId>
|
||||
<artifactId>spring-brick-maven-packager</artifactId>
|
||||
<version>${spring-brick-package.version}</version>
|
||||
<version>${spring-brick.version}</version>
|
||||
<configuration>
|
||||
<mode>${plugin.build.mode}</mode>
|
||||
<pluginInfo>
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
<plugin>
|
||||
<groupId>com.gitee.starblues</groupId>
|
||||
<artifactId>spring-brick-maven-packager</artifactId>
|
||||
<version>${spring-brick-package.version}</version>
|
||||
<version>${spring-brick.version}</version>
|
||||
<configuration>
|
||||
<mode>${plugin.build.mode}</mode>
|
||||
<pluginInfo>
|
||||
|
@ -64,7 +64,7 @@
|
|||
<configFileName>application.yml</configFileName>
|
||||
</pluginInfo>
|
||||
<prodConfig>
|
||||
<packageType>jar</packageType>
|
||||
<packageType>zip</packageType>
|
||||
</prodConfig>
|
||||
</configuration>
|
||||
<executions>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
plugin:
|
||||
runMode: dev
|
||||
runMode: prod
|
||||
mainPackage: cc.iotkit.plugin
|
||||
|
||||
http:
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<plugin>
|
||||
<groupId>com.gitee.starblues</groupId>
|
||||
<artifactId>spring-brick-maven-packager</artifactId>
|
||||
<version>${spring-brick-package.version}</version>
|
||||
<version>${spring-brick.version}</version>
|
||||
<configuration>
|
||||
<mode>${plugin.build.mode}</mode>
|
||||
<pluginInfo>
|
||||
|
|
|
@ -3,6 +3,6 @@ plugin:
|
|||
mainPackage: cc.iotkit.plugin
|
||||
|
||||
hydrovalve:
|
||||
host: 25on621889.goho.co
|
||||
host: xxxx
|
||||
port: 38807
|
||||
interval: 20000
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
<plugin>
|
||||
<groupId>com.gitee.starblues</groupId>
|
||||
<artifactId>spring-brick-maven-packager</artifactId>
|
||||
<version>${spring-brick-package.version}</version>
|
||||
<version>${spring-brick.version}</version>
|
||||
<configuration>
|
||||
<mode>${plugin.build.mode}</mode>
|
||||
<pluginInfo>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
plugin:
|
||||
runMode: dev
|
||||
runMode: prod
|
||||
mainPackage: cc.iotkit.plugin
|
||||
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
<plugin>
|
||||
<groupId>com.gitee.starblues</groupId>
|
||||
<artifactId>spring-brick-maven-packager</artifactId>
|
||||
<version>${spring-brick-package.version}</version>
|
||||
<version>${spring-brick.version}</version>
|
||||
<configuration>
|
||||
<mode>${plugin.build.mode}</mode>
|
||||
<pluginInfo>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
plugin:
|
||||
runMode: dev
|
||||
runMode: prod
|
||||
mainPackage: cc.iotkit.plugin
|
||||
|
||||
mqtt:
|
||||
|
|
10
pom.xml
10
pom.xml
|
@ -10,6 +10,7 @@
|
|||
<module>tcp-plugin</module>
|
||||
<module>DLT645-plugin</module>
|
||||
<module>hydrovalve-plugin</module>
|
||||
<!-- <module>emqx-plugin</module>-->
|
||||
</modules>
|
||||
|
||||
<parent>
|
||||
|
@ -27,8 +28,7 @@
|
|||
<properties>
|
||||
<java.version>11</java.version>
|
||||
<spring-boot.version>2.7.11</spring-boot.version>
|
||||
<spring-brick.version>3.1.2</spring-brick.version>
|
||||
<spring-brick-package.version>3.1.3</spring-brick-package.version>
|
||||
<spring-brick.version>3.1.3</spring-brick.version>
|
||||
<vertx.version>4.2.2</vertx.version>
|
||||
</properties>
|
||||
|
||||
|
@ -86,12 +86,6 @@
|
|||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.gitee.starblues</groupId>
|
||||
<artifactId>spring-brick-maven-packager</artifactId>
|
||||
<version>${spring-brick-package.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -58,7 +58,7 @@
|
|||
<plugin>
|
||||
<groupId>com.gitee.starblues</groupId>
|
||||
<artifactId>spring-brick-maven-packager</artifactId>
|
||||
<version>${spring-brick-package.version}</version>
|
||||
<version>${spring-brick.version}</version>
|
||||
<configuration>
|
||||
<mode>${plugin.build.mode}</mode>
|
||||
<pluginInfo>
|
||||
|
|
|
@ -70,6 +70,7 @@ public class TcpPlugin implements PluginCloseListener, IPlugin {
|
|||
@Override
|
||||
public void close(GenericApplicationContext applicationContext, PluginInfo pluginInfo, PluginCloseType closeType) {
|
||||
log.info("plugin close,type:{},pluginId:{}", closeType, pluginInfo.getPluginId());
|
||||
try {
|
||||
if (deployedId != null) {
|
||||
CountDownLatch wait = new CountDownLatch(1);
|
||||
Future<Void> future = vertx.undeploy(deployedId);
|
||||
|
@ -84,6 +85,9 @@ public class TcpPlugin implements PluginCloseListener, IPlugin {
|
|||
});
|
||||
wait.await(5, TimeUnit.SECONDS);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
log.error("close plugin error", e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -37,6 +37,7 @@ import javax.annotation.PostConstruct;
|
|||
import java.time.Duration;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
|
@ -77,12 +78,13 @@ public class TcpServerVerticle extends AbstractVerticle {
|
|||
private IThingService thingService;
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
initTcpServer();
|
||||
public void stop() {
|
||||
if (netServer != null) {
|
||||
netServer.close(rst -> {
|
||||
log.info("tcp server close:{}", rst.succeeded());
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
log.info("tcp server stopped");
|
||||
}
|
||||
|
||||
|
@ -97,6 +99,7 @@ public class TcpServerVerticle extends AbstractVerticle {
|
|||
if (scriptEngine == null) {
|
||||
throw new BizException("script engine is null");
|
||||
}
|
||||
Executors.newSingleThreadScheduledExecutor().schedule(this::initTcpServer, 3, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
plugin:
|
||||
runMode: dev
|
||||
runMode: prod
|
||||
mainPackage: cc.iotkit.plugin
|
||||
|
||||
tcp:
|
||||
|
|
Loading…
Reference in New Issue