使用ApplicationListener多线程定时任务

使用ApplicationListener<ContextRefreshedEvent>会使多个任务同时执行 是一个实现多线程定时任务的好方法java 首先须要建立一个Class类而且在类上添加@Componet注解,在项目启动的时候将这个类添加进去。多线程 @Component @Slf4j public class Test implements ApplicationListener<Con
相关文章
相关标签/搜索