From 7df8a8bea313a270014a1de4ae0de4c69172c5bf Mon Sep 17 00:00:00 2001 From: wzp <2040239371@qq.com> Date: 星期三, 31 七月 2024 11:15:43 +0800 Subject: [PATCH] 优化图表里的标签显示,设置一定的偏移量,确保标签都在图表内 --- 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