From f891000086af5ac150fc120e1f3c781266f1d063 Mon Sep 17 00:00:00 2001 From: wzp <2040239371@qq.com> Date: 星期三, 21 八月 2024 17:13:57 +0800 Subject: [PATCH] 优化LAQ全景图图表,使用python生成 --- src/main/java/com/ots/framework/config/ThreadPoolConfig.java | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/ots/framework/config/ThreadPoolConfig.java b/src/main/java/com/ots/framework/config/ThreadPoolConfig.java index 4293f31..580fc80 100644 --- a/src/main/java/com/ots/framework/config/ThreadPoolConfig.java +++ b/src/main/java/com/ots/framework/config/ThreadPoolConfig.java @@ -11,13 +11,14 @@ @Configuration public class ThreadPoolConfig { - private int corePoolSize = 50; + private int corePoolSize = 4; - private int maxPoolSize = 200; + private int maxPoolSize = 20; - private int queueCapacity = 1000; + private int queueCapacity = 100; - private int keepAliveSeconds = 300; + private int keepAliveSeconds = 60; + @Bean(name = "threadPoolTaskExecutor") public ThreadPoolTaskExecutor threadPoolTaskExecutor() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); @@ -25,6 +26,8 @@ executor.setCorePoolSize(corePoolSize); executor.setQueueCapacity(queueCapacity); executor.setKeepAliveSeconds(keepAliveSeconds); + //绾跨▼鍓嶇紑鍚嶇О + executor.setThreadNamePrefix("thread-pool-%d"); executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); return executor; -- Gitblit v1.9.1