无人机大图压缩包上传

This commit is contained in:
lcj
2025-11-25 12:29:57 +08:00
parent 6b59d264b4
commit fe79bf282c
4 changed files with 166 additions and 0 deletions

View File

@ -59,6 +59,18 @@ public class AsyncConfig implements AsyncConfigurer {
return executor;
}
// 解压线程池(大文件操作,不需要太多线程)
@Bean("unzipExecutor")
public Executor unzipExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(2);
executor.setMaxPoolSize(4);
executor.setQueueCapacity(10);
executor.setThreadNamePrefix("unzip-");
executor.initialize();
return executor;
}
/**
* 异步执行异常处理
*/