![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Springboot
文章平均质量分 68
ElegantApple
越努力,越幸运
展开
-
Processing of multipart/form-data request failed. 设备上没有空间
Processing of multipart/form-data request failed. 设备上没有空间原创 2022-12-23 15:24:39 · 3313 阅读 · 0 评论 -
Springboot @Schedule + 线程池配置可以轻松实现多个任务之间异步, 但是同一任务同步执行
Springboot @Scheduled 默认是单线程的, 也就是说当我们定义了多个定时任务时,如果有本应该是相同时间触发的定时任务, 会进行排队, 如果某个定时任务执行时间过长, 就会导致其他定时并未按照设置时间来触发执行。 异步任务可以部分解决这个问题, 在定时任务上再加上@Asyns注解,定时任务就会被作为异步任务多线程执行。@Async@Scheduled(cron = "*/5 * * * * ?")public void mapDiagnosisExecutor() throws I原创 2022-04-07 10:27:03 · 5769 阅读 · 0 评论