648540858
2022-04-12 3955e6ed53d450f8faf488d4b74ba0c0c83c5aaa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package com.genersoft.iot.vmp;
 
import java.util.logging.LogManager;
 
import com.genersoft.iot.vmp.conf.druid.EnableDruidSupport;
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.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import springfox.documentation.oas.annotations.EnableOpenApi;
 
/**
 *
 */
@ServletComponentScan("com.genersoft.iot.vmp.conf")
@SpringBootApplication
@EnableScheduling
@EnableOpenApi
@EnableDruidSupport
public class VManageBootstrap extends LogManager {
    private static String[] args;
    private static ConfigurableApplicationContext context;
    public static void main(String[] args) {
        VManageBootstrap.args = args;
        VManageBootstrap.context = SpringApplication.run(VManageBootstrap.class, args);
    }
    // 项目重启
    public static void restart() {
        context.close();
        VManageBootstrap.context = SpringApplication.run(VManageBootstrap.class, args);
    }
    
 
}