From f3e4928995401ba3b7ff0981867293838a50036e Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期二, 31 一月 2023 14:16:47 +0800
Subject: [PATCH] Merge pull request #731 from zl2fxy/patch-1
---
src/main/java/com/genersoft/iot/vmp/VManageBootstrap.java | 35 ++++++++++++++++++++++++++++++++++-
1 files changed, 34 insertions(+), 1 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/VManageBootstrap.java b/src/main/java/com/genersoft/iot/vmp/VManageBootstrap.java
index 4a92e09..af3340d 100644
--- a/src/main/java/com/genersoft/iot/vmp/VManageBootstrap.java
+++ b/src/main/java/com/genersoft/iot/vmp/VManageBootstrap.java
@@ -2,12 +2,45 @@
import java.util.logging.LogManager;
+import com.genersoft.iot.vmp.conf.druid.EnableDruidSupport;
+import com.genersoft.iot.vmp.storager.impl.RedisCatchStorageImpl;
+import com.genersoft.iot.vmp.utils.GitUtil;
+import com.genersoft.iot.vmp.utils.SpringBeanFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.scheduling.annotation.EnableScheduling;
+/**
+ * 鍚姩绫�
+ */
+@ServletComponentScan("com.genersoft.iot.vmp.conf")
@SpringBootApplication
+@EnableScheduling
+@EnableDruidSupport
public class VManageBootstrap extends LogManager {
+
+ private final static Logger logger = LoggerFactory.getLogger(VManageBootstrap.class);
+
+ private static String[] args;
+ private static ConfigurableApplicationContext context;
public static void main(String[] args) {
- SpringApplication.run(VManageBootstrap.class, args);
+ VManageBootstrap.args = args;
+ VManageBootstrap.context = SpringApplication.run(VManageBootstrap.class, args);
+ GitUtil gitUtil1 = SpringBeanFactory.getBean("gitUtil");
+ logger.info("鏋勫缓鐗堟湰锛� {}", gitUtil1.getBuildVersion());
+ logger.info("鏋勫缓鏃堕棿锛� {}", gitUtil1.getBuildDate());
+ logger.info("GIT鏈�鍚庢彁浜ゆ椂闂达細 {}", gitUtil1.getCommitTime());
}
+ // 椤圭洰閲嶅惎
+ public static void restart() {
+ context.close();
+ VManageBootstrap.context = SpringApplication.run(VManageBootstrap.class, args);
+ }
+
+
}
--
Gitblit v1.8.0