648540858
2021-11-24 0eee65bc424cbdb348052ba4ef6b91add28bc6a4
src/main/java/com/genersoft/iot/vmp/VManageBootstrap.java
@@ -3,18 +3,32 @@
import java.util.logging.LogManager;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
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
//@EnableEurekaClient
//@EnableTransactionManagement
//@EnableFeignClients(basePackages = { "com.genersoft.iot.vmp", "org.integrain" })
//@ServletComponentScan("com.genersoft.iot.vmp")
@EnableAutoConfiguration
@EnableScheduling
@EnableOpenApi
public class VManageBootstrap extends LogManager {
   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);
   }
   // 项目重启
   public static void restart() {
      context.close();
      VManageBootstrap.context = SpringApplication.run(VManageBootstrap.class, args);
   }
}