V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  mxinyi1212  ›  全部回复第 1 页 / 共 1 页
回复总数  2
2 天前
回复了 cssTheGreatest 创建的主题 旅行 大家好,三月底去云南,想咨询一下
18 年那会骑小电驴环游洱海用时 1 天,想走就走想停就停很舒服。那会的路还不好走,很多路没有封闭起来。 现在大理那边封了很多路小电驴不让进。

注意:骑电驴一定要注意防晒!!!!!! 风吹日晒,脸一天下来 晒伤了。!!!

饮食:鸡丝米线、 腊排骨火锅(感觉丽江的好吃)
2022-11-15 10:33:45 +08:00
回复了 gzk329 创建的主题 程序员 Springboot 中 想要重启服务 该怎么写?
之前这么用过

public void restart(){
ExecutorService threadPool = new ThreadPoolExecutor(1,1,0, TimeUnit.SECONDS,new ArrayBlockingQueue<>( 1 ),new ThreadPoolExecutor.DiscardOldestPolicy ());
threadPool.execute (()->{
context.close ();
//do xxxx
}
context = SpringApplication.run ( Application.class,args );
} );
threadPool.shutdown ();

}
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3214 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 11ms · UTC 12:02 · PVG 20:02 · LAX 04:02 · JFK 07:02
Developed with CodeLauncher
♥ Do have faith in what you're doing.