springboot schedule定时任务多线程
springboot@scheduled启动的定时任务默认是单线程,为了满足现实生活中的使用场景,开启多个线程,方式如下:import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework...
原创
2018-07-04 17:14:45 ·
2023 阅读 ·
1 评论