摘要: 在我们自定义的实现类继承SmartLifecycle 接口。当Spring容器加载所有bean并完成初始化之后,会接着回调实现该接口的类中对应的方法(start()方法)。 import org.springframework.context.SmartLifecycle; import org.s 阅读全文
posted @ 2019-12-26 17:27 宇枫 阅读(645) 评论(0) 推荐(0) 编辑
摘要: 定时任务 private void start() { scheduledExecutorService = Executors.newScheduledThreadPool(1); if( scheduledExecutorService != null){ Integer ddelay = 10 阅读全文
posted @ 2019-12-26 16:37 宇枫 阅读(471) 评论(0) 推荐(0) 编辑