From 990c50573dba67169999d00a517ab7ad4fa9a5a2 Mon Sep 17 00:00:00 2001 From: levis9527 <804724431@qq.com> Date: Mon, 7 Nov 2022 17:54:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=82=E6=95=B0=E5=8F=98=E6=9B=B4=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E6=97=B6=E8=B0=83=E6=95=B4corePoolSize=E5=92=8CmaxPoo?= =?UTF-8?q?lSize=20=E6=9B=B4=E6=96=B0=E9=A1=BA=E5=BA=8F=E5=8F=8A=E5=89=8D?= =?UTF-8?q?=E7=BD=AE=E6=9D=A1=E4=BB=B6=E5=88=A4=E6=96=AD=20=20=20https://g?= =?UTF-8?q?itee.com/dromara/dynamic-tp/issues/I5ZVV5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/src/main/java/com/dtp/core/DtpRegistry.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/main/java/com/dtp/core/DtpRegistry.java b/core/src/main/java/com/dtp/core/DtpRegistry.java index 3b8e179e..6051b7f3 100644 --- a/core/src/main/java/com/dtp/core/DtpRegistry.java +++ b/core/src/main/java/com/dtp/core/DtpRegistry.java @@ -217,6 +217,10 @@ public class DtpRegistry implements ApplicationRunner, Ordered { private static void doRefresh(DtpExecutor dtpExecutor, ThreadPoolProperties properties) { + if (properties.getMaximumPoolSize() < dtpExecutor.getCorePoolSize()) { + return; + } + if (!Objects.equals(dtpExecutor.getCorePoolSize(), properties.getCorePoolSize())) { dtpExecutor.setCorePoolSize(properties.getCorePoolSize()); } -- Gitee