This commit is contained in:
Leo
2025-03-01 23:39:55 +08:00
parent a394f7f268
commit 41fae55b3f
5 changed files with 87 additions and 53 deletions

View File

@@ -24,7 +24,7 @@ public class AsyncConfig implements AsyncConfigurer {
@Bean(name = "threadPoolTaskExecutor")
public Executor getAsyncExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(10); // 核心线程数
executor.setCorePoolSize(16); // 核心线程数
executor.setMaxPoolSize(128); // 最大线程数
executor.setQueueCapacity(500); // 队列容量
executor.setThreadNamePrefix("Async-Executor-");