增加上级远程启动TeleBoot功能的支持
This commit is contained in:
parent
968ec879f5
commit
712b25fb6e
@ -4,10 +4,20 @@ import java.util.logging.LogManager;
|
|||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.context.ConfigurableApplicationContext;
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
public class VManageBootstrap extends LogManager {
|
public class VManageBootstrap extends LogManager {
|
||||||
|
private static String[] args;
|
||||||
|
private static ConfigurableApplicationContext context;
|
||||||
public static void main(String[] args) {
|
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);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user