SpringBoot启动方法
@SpringBootApplication public class DemoApplication { public static ConfigurableApplicationContext context; public static void main(String[] args) { context = SpringApplication.run(DemoApplication.class, args); } }
只要调用close() 方法就会主动关闭
public void ending(){ DemoApplication.context.close(); }
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)