From ebffd7964e7af58fee84adf602fa30e0787e6240 Mon Sep 17 00:00:00 2001
From: 吴祝攀 <2040239371@qq.com>
Date: 星期四, 06 六月 2024 11:12:14 +0800
Subject: [PATCH] 优化用户名长度限制,设置最长长度是30位

---
 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