This is an automated email from the ASF dual-hosted git repository.

zhangzicheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-shenyu.git


The following commit(s) were added to refs/heads/master by this push:
     new cdddc5ff9 [ISSUE #3406] Sofa and tars using shared thread pool. (#3433)
cdddc5ff9 is described below

commit cdddc5ff992059a0151ae736ef832cc6be8666b9
Author: 拉姆徐 <[email protected]>
AuthorDate: Sat May 28 21:08:10 2022 +0800

    [ISSUE #3406] Sofa and tars using shared thread pool. (#3433)
    
    * [feature:tars plugin #3406] tars using shared thread pool
    
    * [fix:tars plugin #3406] tars using shared thread pool
    
    * [fix:tars plugin #3406] support set default thread pool params
    
    * [fix:tars plugin #3406] merge master
    
    * [fix:tars plugin #3406] add tars upgrade sql
---
 db/init/mysql/schema.sql                           |   7 +-
 db/init/oracle/schema.sql                          |  14 +-
 db/init/pg/create-table.sql                        |   6 +-
 db/upgrade/2.4.3-upgrade-2.5.0-mysql.sql           |   7 +
 db/upgrade/2.4.3-upgrade-2.5.0-pg.sql              |   7 +
 .../admin/transfer/DashboardUserTransfer.java      |  66 +++++-----
 .../src/main/resources/sql-script/h2/schema.sql    |   6 +-
 .../dto/convert/plugin/TarsRegisterConfig.java     | 145 +++++++++++++++++++++
 .../dto/convert/plugin/TarsRegisterConfigTest.java |  54 ++++++++
 .../grpc/transfer/ShenyuServiceTransfer.java       |   2 +-
 .../plugin/motan/proxy/MotanProxyService.java      |   2 +-
 .../org/apache/shenyu/plugin/tars/TarsPlugin.java  |   2 +-
 .../plugin/tars/cache/ApplicationConfigCache.java  |  72 +++++++++-
 .../plugin/tars/handler/TarsPluginDataHandler.java |  19 +++
 .../ShenyuThreadPoolConfiguration.java             |   2 +-
 15 files changed, 367 insertions(+), 44 deletions(-)

diff --git a/db/init/mysql/schema.sql b/db/init/mysql/schema.sql
index 3a8d56b55..ae66ebd62 100644
--- a/db/init/mysql/schema.sql
+++ b/db/init/mysql/schema.sql
@@ -564,7 +564,7 @@ INSERT INTO `plugin` VALUES ('1', 'sign', NULL, 
'Authentication', 20, 0, '2022-0
 INSERT INTO `plugin` VALUES ('10', 'sentinel', NULL, 'FaultTolerance', 140, 0, 
'2022-05-25 18:02:53', '2022-05-25 18:02:53');
 INSERT INTO `plugin` VALUES ('11', 'sofa', 
'{\"protocol\":\"zookeeper\",\"register\":\"127.0.0.1:2181\"}', 'Proxy', 310, 
0, '2022-05-25 18:02:53', '2022-05-25 18:02:53');
 INSERT INTO `plugin` VALUES ('12', 'resilience4j', NULL, 'FaultTolerance', 
310, 0, '2022-05-25 18:02:53', '2022-05-25 18:02:53');
-INSERT INTO `plugin` VALUES ('13', 'tars', 
'{\"multiSelectorHandle\":\"1\",\"multiRuleHandle\":\"0\"}', 'Proxy', 310, 0, 
'2022-05-25 18:02:53', '2022-05-25 18:02:53');
+INSERT INTO `plugin` VALUES ('13', 'tars', 
'{\"multiSelectorHandle\":\"1\",\"multiRuleHandle\":\"0\",\"corethreads\":0,\"threads\":2147483647,\"queues\":0,\"threadpool\":\"\"}',
 'Proxy', 310, 0, '2022-05-25 18:02:53', '2022-05-25 18:02:53');
 INSERT INTO `plugin` VALUES ('14', 'contextPath', NULL, 'HttpProcess', 80, 1, 
'2022-05-25 18:02:53', '2022-05-25 18:02:53');
 INSERT INTO `plugin` VALUES ('15', 'grpc', 
'{\"multiSelectorHandle\":\"1\",\"multiRuleHandle\":\"0\",\"threadpool\":\"cached\"}',
 'Proxy', 310, 0, '2022-05-25 18:02:53', '2022-05-25 18:02:53');
 INSERT INTO `plugin` VALUES ('16', 'redirect', NULL, 'HttpProcess', 110, 0, 
'2022-05-25 18:02:53', '2022-05-25 18:02:53');
@@ -765,6 +765,11 @@ INSERT INTO `plugin_handle` VALUES ('1529402613204172864', 
'30', 'minIdle', 'min
 INSERT INTO `plugin_handle` VALUES ('1529402613204172865', '30', 'maxActive', 
'maxActive', 1, 3, 9, 
'{\"required\":\"0\",\"defaultValue\":\"8\",\"rule\":\"\"}', '2022-05-25 
18:02:53', '2022-05-25 18:02:53');
 INSERT INTO `plugin_handle` VALUES ('1529402613204172866', '30', 'maxWait', 
'maxWait', 3, 3, 10, 
'{\"required\":\"0\",\"defaultValue\":\"-1\",\"rule\":\"\"}', '2022-05-25 
18:02:53', '2022-05-25 18:02:53');
 INSERT INTO `plugin_handle` VALUES ('1529402613204172867', '30', 
'timeoutSeconds', 'timeoutSeconds', 1, 2, 0, 
'{\"required\":\"0\",\"defaultValue\":\"60\",\"rule\":\"\"}', '2022-05-25 
18:02:53', '2022-05-25 18:02:53');
+INSERT INTO `plugin_handle` VALUES ('1529402613204172868', '13', 
'corethreads', 'corethreads', 1, 3, 0, 
'{\"required\":\"0\",\"defaultValue\":\"0\",\"placeholder\":\"corethreads\",\"rule\":\"\"}',
 '2022-05-25 18:02:53', '2022-05-25 18:02:53');
+INSERT INTO `plugin_handle` VALUES ('1529402613204172869', '13', 'threads', 
'threads', 1, 3, 0, 
'{\"required\":\"0\",\"defaultValue\":\"2147483647\",\"placeholder\":\"threads\",\"rule\":\"\"}',
 '2022-05-25 18:02:53', '2022-05-25 18:02:53');
+INSERT INTO `plugin_handle` VALUES ('1529402613204172870', '13', 'queues', 
'queues', 1, 3, 0, 
'{\"required\":\"0\",\"defaultValue\":\"0\",\"placeholder\":\"queues\",\"rule\":\"\"}',
 '2022-05-25 18:02:53', '2022-05-25 18:02:53');
+INSERT INTO `plugin_handle` VALUES ('1529402613204172871', '13', 'threadpool', 
'threadpool', 3, 3, 0, 
'{\"required\":\"0\",\"defaultValue\":\"cached\",\"placeholder\":\"threadpool\",\"rule\":\"\"}',
 '2022-05-25 18:02:53', '2022-05-25 18:02:53');
+
 
 -- ----------------------------
 -- Table structure for resource
diff --git a/db/init/oracle/schema.sql b/db/init/oracle/schema.sql
index 1cf42b91a..fbf65446b 100644
--- a/db/init/oracle/schema.sql
+++ b/db/init/oracle/schema.sql
@@ -780,7 +780,7 @@ INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX(plugin(id)) */ INTO 
plugin (id, name, role
 INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX(plugin(id)) */ INTO plugin (id, name, 
role, sort, enabled) VALUES ('10','sentinel', 'FaultTolerance', 140,'0');
 INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX(plugin(id)) */ INTO plugin (id, name, 
role, sort, config, enabled) VALUES ('11','sofa', 'Proxy', 310, 
'{"protocol":"zookeeper","register":"127.0.0.1:2181"}', '0');
 INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX(plugin(id)) */ INTO plugin (id, name, 
role, sort, enabled) VALUES ('12','resilience4j', 'FaultTolerance', 310,'0');
-INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX(plugin(id)) */ INTO plugin (id, name, 
role, sort, config, enabled) VALUES ('13', 'tars', 'Proxy', 
310,'{"multiSelectorHandle":"1","multiRuleHandle":"0"}','0');
+INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX(plugin(id)) */ INTO plugin (id, name, 
role, sort, config, enabled) VALUES ('13', 'tars', 'Proxy', 
310,'{"multiSelectorHandle":"1","multiRuleHandle":"0","corethreads":0,"threads":2147483647,"queues":0,"threadpool":""}','0');
 INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX(plugin(id)) */ INTO plugin (id, name, 
role, sort, enabled) VALUES ('14', 'contextPath', 'HttpProcess', 80,'1');
 INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX(plugin(id)) */ INTO plugin (id, name, 
role, sort, config, enabled) VALUES ('15', 'grpc', 'Proxy', 
310,'{"multiSelectorHandle":"1","multiRuleHandle":"0","threadpool":"cached"}','0');
 INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX(plugin(id)) */ INTO plugin (id, name, 
role, sort, enabled) VALUES ('16', 'redirect', 'HttpProcess', 110,'0');
@@ -1178,6 +1178,18 @@ values ('1518229897210273856', '13', 
'multiSelectorHandle', 'multiSelectorHandle
 insert /*+ IGNORE_ROW_ON_DUPKEY_INDEX(plugin_handle(plugin_id, field, type)) 
*/ into plugin_handle (ID, PLUGIN_ID, FIELD, LABEL, DATA_TYPE, TYPE, SORT, 
EXT_OBJ)
 values ('1518229897214468096', '13', 'multiRuleHandle', 'multiRuleHandle', 3, 
3, 1, null);
 
+insert /*+ IGNORE_ROW_ON_DUPKEY_INDEX(plugin_handle(plugin_id, field, type)) 
*/ into plugin_handle (ID, PLUGIN_ID, FIELD, LABEL, DATA_TYPE, TYPE, SORT, 
EXT_OBJ)
+values ('1518229897210273858', '13', 'corethreads', 'corethreads', 1, 3, 0, 
'{"required":"0","defaultValue":"0","placeholder":"corethreads","rule":""}');
+
+insert /*+ IGNORE_ROW_ON_DUPKEY_INDEX(plugin_handle(plugin_id, field, type)) 
*/ into plugin_handle (ID, PLUGIN_ID, FIELD, LABEL, DATA_TYPE, TYPE, SORT, 
EXT_OBJ)
+values ('1518229897210273859', '13', 'threads', 'threads', 1, 3, 0, 
'{"required":"0","defaultValue":"2147483647","placeholder":"threads","rule":""}');
+
+insert /*+ IGNORE_ROW_ON_DUPKEY_INDEX(plugin_handle(plugin_id, field, type)) 
*/ into plugin_handle (ID, PLUGIN_ID, FIELD, LABEL, DATA_TYPE, TYPE, SORT, 
EXT_OBJ)
+values ('1518229897210273860', '13', 'queues', 'queues', 1, 3, 0, 
'{"required":"0","defaultValue":"0","placeholder":"queues","rule":""}');
+
+insert /*+ IGNORE_ROW_ON_DUPKEY_INDEX(plugin_handle(plugin_id, field, type)) 
*/ into plugin_handle (ID, PLUGIN_ID, FIELD, LABEL, DATA_TYPE, TYPE, SORT, 
EXT_OBJ)
+values ('1518229897210273861', '13', 'threadpool', 'threadpool', 3, 3, 0, 
'{"required":"0","defaultValue":"cached","placeholder":"threadpool","rule":""}');
+
 insert /*+ IGNORE_ROW_ON_DUPKEY_INDEX(plugin_handle(plugin_id, field, type)) 
*/ into plugin_handle (ID, PLUGIN_ID, FIELD, LABEL, DATA_TYPE, TYPE, SORT, 
EXT_OBJ)
 values ('1518229897214468097', '15', 'upstreamUrl', 'ip:port', 2, 1, 1, 
'{"required":"1","placeholder":"","rule":""}');
 
diff --git a/db/init/pg/create-table.sql b/db/init/pg/create-table.sql
index 68fee7933..2c2ae0573 100644
--- a/db/init/pg/create-table.sql
+++ b/db/init/pg/create-table.sql
@@ -641,7 +641,7 @@ INSERT INTO "public"."plugin" VALUES ('1', 'sign', NULL, 
'Authentication', 20, 0
 INSERT INTO "public"."plugin" VALUES ('10', 'sentinel', NULL, 
'FaultTolerance', 140, 0, '2022-05-25 18:08:01', '2022-05-25 18:08:01');
 INSERT INTO "public"."plugin" VALUES ('11', 'sofa', 
'{"protocol":"zookeeper","register":"127.0.0.1:2181"}', 'Proxy', 310, 0, 
'2022-05-25 18:08:01', '2022-05-25 18:08:01');
 INSERT INTO "public"."plugin" VALUES ('12', 'resilience4j', NULL, 
'FaultTolerance', 310, 0, '2022-05-25 18:08:01', '2022-05-25 18:08:01');
-INSERT INTO "public"."plugin" VALUES ('13', 'tars', 
'{"multiSelectorHandle":"1","multiRuleHandle":"0"}', 'Proxy', 310, 0, 
'2022-05-25 18:08:01', '2022-05-25 18:08:01');
+INSERT INTO "public"."plugin" VALUES ('13', 'tars', 
'{"multiSelectorHandle":"1","multiRuleHandle":"0","corethreads":0,"threads":2147483647,"queues":0,"threadpool":""}',
 'Proxy', 310, 0, '2022-05-25 18:08:01', '2022-05-25 18:08:01');
 INSERT INTO "public"."plugin" VALUES ('14', 'contextPath', NULL, 
'HttpProcess', 80, 1, '2022-05-25 18:08:01', '2022-05-25 18:08:01');
 INSERT INTO "public"."plugin" VALUES ('15', 'grpc', 
'{"multiSelectorHandle":"1","multiRuleHandle":"0","threadpool":"cached"}', 
'Proxy', 310, 0, '2022-05-25 18:08:01', '2022-05-25 18:08:01');
 INSERT INTO "public"."plugin" VALUES ('16', 'redirect', NULL, 'HttpProcess', 
110, 0, '2022-05-25 18:08:01', '2022-05-25 18:08:01');
@@ -850,6 +850,10 @@ INSERT INTO "public"."plugin_handle" VALUES 
('1529403902783524909', '30', 'minId
 INSERT INTO "public"."plugin_handle" VALUES ('1529403902783524910', '30', 
'maxActive', 'maxActive', 1, 3, 9, 
'{"required":"0","defaultValue":"8","rule":""}', '2022-05-25 18:08:01', 
'2022-05-25 18:08:01');
 INSERT INTO "public"."plugin_handle" VALUES ('1529403902783524911', '30', 
'maxWait', 'maxWait', 3, 3, 10, 
'{"required":"0","defaultValue":"-1","rule":""}', '2022-05-25 18:08:01', 
'2022-05-25 18:08:01');
 INSERT INTO "public"."plugin_handle" VALUES ('1529403902783524912', '30', 
'timeoutSeconds', 'timeoutSeconds', 1, 2, 0, 
'{"required":"0","defaultValue":"60","rule":""}', '2022-05-25 18:08:01', 
'2022-05-25 18:08:01');
+INSERT INTO "public"."plugin_handle" VALUES ('1529403902783524913', '13', 
'corethreads', 'corethreads', 1, 3, 0, 
'{"required":"0","defaultValue":"0","placeholder":"corethreads","rule":""}', 
'2022-05-25 18:08:01', '2022-05-25 18:08:01');
+INSERT INTO "public"."plugin_handle" VALUES ('1529403902783524914', '13', 
'threads', 'threads', 1, 3, 0, 
'{"required":"0","defaultValue":"2147483647","placeholder":"threads","rule":""}',
 '2022-05-25 18:08:01', '2022-05-25 18:08:01');
+INSERT INTO "public"."plugin_handle" VALUES ('1529403902783524915', '13', 
'queues', 'queues', 1, 3, 0, 
'{"required":"0","defaultValue":"0","placeholder":"queues","rule":""}', 
'2022-05-25 18:08:01', '2022-05-25 18:08:01');
+INSERT INTO "public"."plugin_handle" VALUES ('1529403902783524916', '13', 
'threadpool', 'threadpool', 3, 3, 0, 
'{"required":"0","defaultValue":"cached","placeholder":"threadpool","rule":""}',
 '2022-05-25 18:08:01', '2022-05-25 18:08:01');
 
 -- ----------------------------
 -- Table structure for resource
diff --git a/db/upgrade/2.4.3-upgrade-2.5.0-mysql.sql 
b/db/upgrade/2.4.3-upgrade-2.5.0-mysql.sql
index e4b59ba2b..bc3aeadb3 100644
--- a/db/upgrade/2.4.3-upgrade-2.5.0-mysql.sql
+++ b/db/upgrade/2.4.3-upgrade-2.5.0-mysql.sql
@@ -52,3 +52,10 @@ CREATE TABLE IF NOT EXISTS `operation_record_log`
     `operation_time` datetime    default now()    not null comment 'operation 
time',
     `operation_type` varchar(60) default 'update' not null comment 'operation 
type:create/update/delete/register...'
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci 
ROW_FORMAT=DYNAMIC  comment 'operation record log';
+
+-- insert plugin_handle data for tars
+INSERT INTO `plugin_handle` VALUES ('1529402613204172868', '13', 
'corethreads', 'corethreads', 1, 3, 0, 
'{\"required\":\"0\",\"defaultValue\":\"0\",\"placeholder\":\"corethreads\",\"rule\":\"\"}',
 '2022-05-25 18:02:53', '2022-05-25 18:02:53');
+INSERT INTO `plugin_handle` VALUES ('1529402613204172869', '13', 'threads', 
'threads', 1, 3, 0, 
'{\"required\":\"0\",\"defaultValue\":\"2147483647\",\"placeholder\":\"threads\",\"rule\":\"\"}',
 '2022-05-25 18:02:53', '2022-05-25 18:02:53');
+INSERT INTO `plugin_handle` VALUES ('1529402613204172870', '13', 'queues', 
'queues', 1, 3, 0, 
'{\"required\":\"0\",\"defaultValue\":\"0\",\"placeholder\":\"queues\",\"rule\":\"\"}',
 '2022-05-25 18:02:53', '2022-05-25 18:02:53');
+INSERT INTO `plugin_handle` VALUES ('1529402613204172871', '13', 'threadpool', 
'threadpool', 3, 3, 0, 
'{\"required\":\"0\",\"defaultValue\":\"cached\",\"placeholder\":\"threadpool\",\"rule\":\"\"}',
 '2022-05-25 18:02:53', '2022-05-25 18:02:53');
+UPDATE plugin SET 
config='{\"multiSelectorHandle\":\"1\",\"multiRuleHandle\":\"0\",\"corethreads\":0,\"threads\":2147483647,\"queues\":0,\"threadpool\":\"\"}'
 WHERE `name` = 'tars';
diff --git a/db/upgrade/2.4.3-upgrade-2.5.0-pg.sql 
b/db/upgrade/2.4.3-upgrade-2.5.0-pg.sql
index 4997f1088..c1483def4 100644
--- a/db/upgrade/2.4.3-upgrade-2.5.0-pg.sql
+++ b/db/upgrade/2.4.3-upgrade-2.5.0-pg.sql
@@ -62,3 +62,10 @@ COMMENT ON COLUMN "operation_record_log"."operator" IS 
'operator [user or app]]'
 COMMENT ON COLUMN "operation_record_log"."operation_time" IS 'operation time';
 COMMENT ON COLUMN "operation_record_log"."operation_type" IS 'operation 
type:create/update/delete/register...';
 COMMENT ON TABLE "operation_record_log" IS 'operation record log';
+
+-- insert plugin_handle data for tars
+INSERT INTO "public"."plugin_handle" VALUES ('1529403902783524913', '13', 
'corethreads', 'corethreads', 1, 3, 0, 
'{"required":"0","defaultValue":"0","placeholder":"corethreads","rule":""}', 
'2022-05-25 18:08:01', '2022-05-25 18:08:01');
+INSERT INTO "public"."plugin_handle" VALUES ('1529403902783524914', '13', 
'threads', 'threads', 1, 3, 0, 
'{"required":"0","defaultValue":"2147483647","placeholder":"threads","rule":""}',
 '2022-05-25 18:08:01', '2022-05-25 18:08:01');
+INSERT INTO "public"."plugin_handle" VALUES ('1529403902783524915', '13', 
'queues', 'queues', 1, 3, 0, 
'{"required":"0","defaultValue":"0","placeholder":"queues","rule":""}', 
'2022-05-25 18:08:01', '2022-05-25 18:08:01');
+INSERT INTO "public"."plugin_handle" VALUES ('1529403902783524916', '13', 
'threadpool', 'threadpool', 3, 3, 0, 
'{"required":"0","defaultValue":"cached","placeholder":"threadpool","rule":""}',
 '2022-05-25 18:08:01', '2022-05-25 18:08:01');
+UPDATE plugin SET 
config='{\"multiSelectorHandle\":\"1\",\"multiRuleHandle\":\"0\",\"corethreads\":0,\"threads\":2147483647,\"queues\":0,\"threadpool\":\"\"}'
 WHERE `name` = 'tars';
diff --git 
a/shenyu-admin/src/main/java/org/apache/shenyu/admin/transfer/DashboardUserTransfer.java
 
b/shenyu-admin/src/main/java/org/apache/shenyu/admin/transfer/DashboardUserTransfer.java
index 9014698b8..a84f03f93 100644
--- 
a/shenyu-admin/src/main/java/org/apache/shenyu/admin/transfer/DashboardUserTransfer.java
+++ 
b/shenyu-admin/src/main/java/org/apache/shenyu/admin/transfer/DashboardUserTransfer.java
@@ -35,60 +35,60 @@ public enum DashboardUserTransfer {
     INSTANCE;
 
     /**
-     * conversion data to VO
+     * conversion data to VO.
      * @param dashboardUserDTO original data
      * @return {@linkplain DashboardUserVO}
      */
     public DashboardUserVO transferDTO2VO(final DashboardUserDTO 
dashboardUserDTO) {
         return Optional.ofNullable(dashboardUserDTO).map(data -> {
-                    DashboardUserVO dashboardVO = new DashboardUserVO();
-                    dashboardVO.setId(data.getId());
-                    dashboardVO.setUserName(data.getUserName());
-                    dashboardVO.setPassword(data.getPassword());
-                    dashboardVO.setRole(data.getRole());
-                    dashboardVO.setEnabled(data.getEnabled());
-                    return dashboardVO;
-                })
-                .orElse(null);
+            DashboardUserVO dashboardVO = new DashboardUserVO();
+            dashboardVO.setId(data.getId());
+            dashboardVO.setUserName(data.getUserName());
+            dashboardVO.setPassword(data.getPassword());
+            dashboardVO.setRole(data.getRole());
+            dashboardVO.setEnabled(data.getEnabled());
+            return dashboardVO;
+        })
+        .orElse(null);
     }
 
     /**
-     * conversion dashboardUserVO to loginDashboardUserVO
+     * conversion dashboardUserVO to loginDashboardUserVO.
      * @param dashboardUserVO original data
      * @return {@linkplain LoginDashboardUserVO}
      */
     public LoginDashboardUserVO transferVO2LoginVO(final DashboardUserVO 
dashboardUserVO) {
         return Optional.ofNullable(dashboardUserVO).map(data -> {
-                    LoginDashboardUserVO dashboardVO = new 
LoginDashboardUserVO();
-                    dashboardVO.setId(data.getId());
-                    dashboardVO.setUserName(data.getUserName());
-                    dashboardVO.setPassword(data.getPassword());
-                    dashboardVO.setRole(data.getRole());
-                    dashboardVO.setEnabled(data.getEnabled());
-                    dashboardVO.setDateCreated(data.getDateCreated());
-                    dashboardVO.setDateUpdated(data.getDateUpdated());
-                    return dashboardVO;
-                })
-                .orElse(null);
+            LoginDashboardUserVO dashboardVO = new LoginDashboardUserVO();
+            dashboardVO.setId(data.getId());
+            dashboardVO.setUserName(data.getUserName());
+            dashboardVO.setPassword(data.getPassword());
+            dashboardVO.setRole(data.getRole());
+            dashboardVO.setEnabled(data.getEnabled());
+            dashboardVO.setDateCreated(data.getDateCreated());
+            dashboardVO.setDateUpdated(data.getDateUpdated());
+            return dashboardVO;
+        })
+        .orElse(null);
     }
 
     /**
-     * conversion dashboardUserVO to dashboardUserEditVO
+     * conversion dashboardUserVO to dashboardUserEditVO.
      * @param dashboardUserVO dashboardUserVO
      * @return {@linkplain DashboardUserEditVO}
      */
     public DashboardUserEditVO transfer2EditVO(final DashboardUserVO 
dashboardUserVO) {
         return Optional.ofNullable(dashboardUserVO).map(data -> {
-                    DashboardUserEditVO vo = new DashboardUserEditVO();
-                    vo.setId(data.getId());
-                    vo.setPassword(data.getPassword());
-                    vo.setUserName(data.getUserName());
-                    vo.setRole(data.getRole());
-                    vo.setEnabled(data.getEnabled());
-                    vo.setDateCreated(data.getDateCreated());
-                    vo.setDateUpdated(data.getDateUpdated());
-                    return vo;
-                }).orElse(null);
+            DashboardUserEditVO vo = new DashboardUserEditVO();
+            vo.setId(data.getId());
+            vo.setPassword(data.getPassword());
+            vo.setUserName(data.getUserName());
+            vo.setRole(data.getRole());
+            vo.setEnabled(data.getEnabled());
+            vo.setDateCreated(data.getDateCreated());
+            vo.setDateUpdated(data.getDateUpdated());
+            return vo;
+        }).orElse(null);
     }
 
 }
diff --git a/shenyu-admin/src/main/resources/sql-script/h2/schema.sql 
b/shenyu-admin/src/main/resources/sql-script/h2/schema.sql
index 66fbf3dd6..8d9efe505 100644
--- a/shenyu-admin/src/main/resources/sql-script/h2/schema.sql
+++ b/shenyu-admin/src/main/resources/sql-script/h2/schema.sql
@@ -360,7 +360,7 @@ INSERT IGNORE INTO `plugin` (`id`, `name`, `role`, `sort`, 
`enabled`) VALUES ('9
 INSERT IGNORE INTO `plugin` (`id`, `name`, `role`, `sort`, `enabled`) VALUES 
('10','sentinel', 'FaultTolerance', 140,'0');
 INSERT IGNORE INTO `plugin` (`id`, `name`, `role`, `sort`, `config`, 
`enabled`) VALUES ('11','sofa', 'Proxy', 310, 
'{"protocol":"zookeeper","register":"127.0.0.1:2181"}', '0');
 INSERT IGNORE INTO `plugin` (`id`, `name`, `role`, `sort`, `enabled`) VALUES 
('12','resilience4j', 'FaultTolerance', 310,'0');
-INSERT IGNORE INTO `plugin` (`id`, `name`, `role`, `sort`, `config`, 
`enabled`) VALUES ('13', 'tars', 'Proxy', 
310,'{"multiSelectorHandle":"1","multiRuleHandle":"0"}','0');
+INSERT IGNORE INTO `plugin` (`id`, `name`, `role`, `sort`, `config`, 
`enabled`) VALUES ('13', 'tars', 'Proxy', 
310,'{"multiSelectorHandle":"1","multiRuleHandle":"0","corethreads":0,"threads":2147483647,"queues":0,"threadpool":""}','0');
 INSERT IGNORE INTO `plugin` (`id`, `name`, `role`, `sort`, `enabled`) VALUES 
('14', 'contextPath', 'HttpProcess', 80,'1');
 INSERT IGNORE INTO `plugin` (`id`, `name`, `role`, `sort`, `config`, 
`enabled`) VALUES ('15', 'grpc', 'Proxy', 
310,'{"multiSelectorHandle":"1","multiRuleHandle":"0","threadpool":"cached"}','0');
 INSERT IGNORE INTO `plugin` (`id`, `name`, `role`, `sort`, `enabled`) VALUES 
('16', 'redirect', 'HttpProcess', 110,'0');
@@ -533,6 +533,10 @@ INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,
 INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1529402613204172865', '30', 'maxActive', 'maxActive', 1, 3, 9, 
'{"required":"0","defaultValue":"8","rule":""}');
 INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1529402613204172866', '30', 'maxWait', 'maxWait', 3, 3, 10, 
'{"required":"0","defaultValue":"-1","rule":""}');
 INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1529402613204172867', '30', 'timeoutSeconds', 'timeoutSeconds', 1, 2, 0, 
'{"required":"0","defaultValue":"60","rule":""}');
+INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1529402613204172868','13', 'corethreads', 'corethreads', 1, 3, 0, 
'{"required":"0","defaultValue":"0","placeholder":"corethreads","rule":""}');
+INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1529402613204172869''13', 'threads', 'threads', 1, 3, 0, 
'{"required":"0","defaultValue":"2147483647","placeholder":"threads","rule":""}');
+INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1529402613204172870''13', 'queues', 'queues', 1, 3, 0, 
'{"required":"0","defaultValue":"0","placeholder":"queues","rule":""}');
+INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1529402613204172871''13', 'threadpool', 'threadpool', 3, 3, 0, 
'{"required":"0","defaultValue":"cached","placeholder":"threadpool","rule":""}');
 
 /** insert resource for resource */
 INSERT IGNORE INTO `resource` (`id`, `parent_id`, `title`, `name`, `url`, 
`component`, `resource_type`, `sort`, `icon`, `is_leaf`, `is_route`, `perms`, 
`status`) 
VALUES('1346775491550474240','','SHENYU.MENU.PLUGIN.LIST','plug','/plug','PluginList','0','0','dashboard','0','0','','1');
diff --git 
a/shenyu-common/src/main/java/org/apache/shenyu/common/dto/convert/plugin/TarsRegisterConfig.java
 
b/shenyu-common/src/main/java/org/apache/shenyu/common/dto/convert/plugin/TarsRegisterConfig.java
new file mode 100644
index 000000000..14bc14fd6
--- /dev/null
+++ 
b/shenyu-common/src/main/java/org/apache/shenyu/common/dto/convert/plugin/TarsRegisterConfig.java
@@ -0,0 +1,145 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shenyu.common.dto.convert.plugin;
+
+import java.io.Serializable;
+import java.util.Objects;
+
+/**
+ * The type tars register config.
+ */
+public class TarsRegisterConfig implements Serializable {
+
+    private static final long serialVersionUID = -1124348422759120146L;
+
+    private String threadpool;
+
+    private Integer corethreads;
+
+    private Integer threads;
+
+    private Integer queues;
+
+    /**
+     * get threadpool.
+     *
+     * @return threadpool
+     */
+    public String getThreadpool() {
+        return threadpool;
+    }
+
+    /**
+     * set threadpool.
+     *
+     * @param threadpool threadpool
+     */
+    public void setThreadpool(final String threadpool) {
+        this.threadpool = threadpool;
+    }
+
+    /**
+     * get corethreads.
+     *
+     * @return corethreads
+     */
+    public Integer getCorethreads() {
+        return corethreads;
+    }
+
+    /**
+     * set corethreads.
+     *
+     * @param corethreads corethreads
+     */
+    public void setCorethreads(final Integer corethreads) {
+        this.corethreads = corethreads;
+    }
+
+    /**
+     * get threads.
+     *
+     * @return threads
+     */
+    public Integer getThreads() {
+        return threads;
+    }
+
+    /**
+     * set threads.
+     *
+     * @param threads threads
+     */
+    public void setThreads(final Integer threads) {
+        this.threads = threads;
+    }
+
+    /**
+     * get queues.
+     *
+     * @return queues
+     */
+    public Integer getQueues() {
+        return queues;
+    }
+
+    /**
+     * set queues.
+     *
+     * @param queues queues
+     */
+    public void setQueues(final Integer queues) {
+        this.queues = queues;
+    }
+
+    @Override
+    public boolean equals(final Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+        TarsRegisterConfig that = (TarsRegisterConfig) o;
+        return Objects.equals(threadpool, that.threadpool) && 
Objects.equals(corethreads, that.corethreads)
+                && Objects.equals(threads, that.threads) && 
Objects.equals(queues, that.queues);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(threadpool, corethreads, threads, queues);
+    }
+
+    @Override
+    public String toString() {
+        return "TarsRegisterConfig{"
+                + "threadpool='"
+                + threadpool
+                + '\''
+                + ", corethreads='"
+                + corethreads
+                + '\''
+                + ", threads='"
+                + threads
+                + '\''
+                + ", queues='"
+                + queues
+                + '\''
+                + '}';
+    }
+}
diff --git 
a/shenyu-common/src/test/java/org/apache/shenyu/common/dto/convert/plugin/TarsRegisterConfigTest.java
 
b/shenyu-common/src/test/java/org/apache/shenyu/common/dto/convert/plugin/TarsRegisterConfigTest.java
new file mode 100644
index 000000000..644e4ddb5
--- /dev/null
+++ 
b/shenyu-common/src/test/java/org/apache/shenyu/common/dto/convert/plugin/TarsRegisterConfigTest.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shenyu.common.dto.convert.plugin;
+
+import com.google.common.collect.ImmutableSet;
+import org.junit.jupiter.api.Test;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.hasSize;
+import static org.hamcrest.core.Is.is;
+
+/**
+ * Test case for TarsRegisterConfigTest.
+ */
+public class TarsRegisterConfigTest {
+    
+    @Test
+    public void testGetterSetter() {
+        TarsRegisterConfig config = new TarsRegisterConfig();
+        config.setCorethreads(10);
+        config.setThreads(10);
+        config.setQueues(2);
+        config.setThreadpool("threadPool");
+        
+        assertThat(config.getCorethreads(), is(10));
+        assertThat(config.getThreads(), is(10));
+        assertThat(config.getQueues(), is(2));
+        assertThat(config.getThreadpool(), is("threadPool"));
+    }
+    
+    @Test
+    public void testEqualsAndHashCode() {
+        TarsRegisterConfig config1 = new TarsRegisterConfig();
+        TarsRegisterConfig config2 = new TarsRegisterConfig();
+        
+        assertThat(ImmutableSet.of(config1, config2), hasSize(1));
+    }
+    
+}
diff --git 
a/shenyu-plugin/shenyu-plugin-grpc/src/main/java/org/apache/shenyu/plugin/grpc/transfer/ShenyuServiceTransfer.java
 
b/shenyu-plugin/shenyu-plugin-grpc/src/main/java/org/apache/shenyu/plugin/grpc/transfer/ShenyuServiceTransfer.java
index b7d892982..7b19a0a8a 100644
--- 
a/shenyu-plugin/shenyu-plugin-grpc/src/main/java/org/apache/shenyu/plugin/grpc/transfer/ShenyuServiceTransfer.java
+++ 
b/shenyu-plugin/shenyu-plugin-grpc/src/main/java/org/apache/shenyu/plugin/grpc/transfer/ShenyuServiceTransfer.java
@@ -32,7 +32,7 @@ public enum ShenyuServiceTransfer {
     INSTANCE;
 
     /**
-     * deep copy instance
+     * deep copy instance.
      * @param instance source data
      * @return The new instance
      */
diff --git 
a/shenyu-plugin/shenyu-plugin-motan/src/main/java/org/apache/shenyu/plugin/motan/proxy/MotanProxyService.java
 
b/shenyu-plugin/shenyu-plugin-motan/src/main/java/org/apache/shenyu/plugin/motan/proxy/MotanProxyService.java
index 1eb0486af..3c7c95408 100644
--- 
a/shenyu-plugin/shenyu-plugin-motan/src/main/java/org/apache/shenyu/plugin/motan/proxy/MotanProxyService.java
+++ 
b/shenyu-plugin/shenyu-plugin-motan/src/main/java/org/apache/shenyu/plugin/motan/proxy/MotanProxyService.java
@@ -144,7 +144,7 @@ public class MotanProxyService {
             default:
                 int corePoolSize = 
Optional.ofNullable(config.getCorethreads()).orElse(0);
                 int maximumPoolSize = 
Optional.ofNullable(config.getThreads()).orElse(Integer.MAX_VALUE);
-                int queueSize = 
Optional.ofNullable(config.getThreads()).orElse(0);
+                int queueSize = 
Optional.ofNullable(config.getQueues()).orElse(0);
                 threadPool = new ThreadPoolExecutor(corePoolSize, 
maximumPoolSize, 60L, TimeUnit.SECONDS,
                         queueSize > 0 ? new LinkedBlockingQueue<>(queueSize) : 
new SynchronousQueue<>(), factory);
         }
diff --git 
a/shenyu-plugin/shenyu-plugin-tars/src/main/java/org/apache/shenyu/plugin/tars/TarsPlugin.java
 
b/shenyu-plugin/shenyu-plugin-tars/src/main/java/org/apache/shenyu/plugin/tars/TarsPlugin.java
index 4e62ed6bc..5790419d9 100644
--- 
a/shenyu-plugin/shenyu-plugin-tars/src/main/java/org/apache/shenyu/plugin/tars/TarsPlugin.java
+++ 
b/shenyu-plugin/shenyu-plugin-tars/src/main/java/org/apache/shenyu/plugin/tars/TarsPlugin.java
@@ -29,9 +29,9 @@ import org.apache.shenyu.common.exception.ShenyuException;
 import org.apache.shenyu.plugin.api.ShenyuPluginChain;
 import org.apache.shenyu.plugin.api.context.ShenyuContext;
 import org.apache.shenyu.plugin.api.result.ShenyuResultEnum;
-import org.apache.shenyu.plugin.base.AbstractShenyuPlugin;
 import org.apache.shenyu.plugin.api.result.ShenyuResultWrap;
 import org.apache.shenyu.plugin.api.utils.WebFluxResultUtils;
+import org.apache.shenyu.plugin.base.AbstractShenyuPlugin;
 import org.apache.shenyu.plugin.tars.cache.ApplicationConfigCache;
 import org.apache.shenyu.plugin.tars.proxy.TarsInvokePrxList;
 import org.apache.shenyu.plugin.tars.util.PrxInfoUtil;
diff --git 
a/shenyu-plugin/shenyu-plugin-tars/src/main/java/org/apache/shenyu/plugin/tars/cache/ApplicationConfigCache.java
 
b/shenyu-plugin/shenyu-plugin-tars/src/main/java/org/apache/shenyu/plugin/tars/cache/ApplicationConfigCache.java
index f73dcdb06..c87b05f17 100644
--- 
a/shenyu-plugin/shenyu-plugin-tars/src/main/java/org/apache/shenyu/plugin/tars/cache/ApplicationConfigCache.java
+++ 
b/shenyu-plugin/shenyu-plugin-tars/src/main/java/org/apache/shenyu/plugin/tars/cache/ApplicationConfigCache.java
@@ -28,12 +28,17 @@ import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.collections4.IterableUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.tuple.Pair;
+import org.apache.shenyu.common.concurrent.ShenyuThreadFactory;
+import org.apache.shenyu.common.concurrent.ShenyuThreadPoolExecutor;
 import org.apache.shenyu.common.constant.Constants;
 import org.apache.shenyu.common.dto.MetaData;
 import org.apache.shenyu.common.dto.SelectorData;
+import org.apache.shenyu.common.dto.convert.plugin.TarsRegisterConfig;
 import org.apache.shenyu.common.dto.convert.selector.TarsUpstream;
 import org.apache.shenyu.common.exception.ShenyuException;
 import org.apache.shenyu.common.utils.GsonUtils;
+import org.apache.shenyu.common.utils.Singleton;
+import org.apache.shenyu.plugin.api.utils.SpringBeanUtils;
 import org.apache.shenyu.plugin.tars.exception.ShenyuTarsPluginException;
 import org.apache.shenyu.plugin.tars.proxy.TarsInvokePrx;
 import org.apache.shenyu.plugin.tars.proxy.TarsInvokePrxList;
@@ -46,17 +51,29 @@ import 
org.assertj.core.internal.bytebuddy.dynamic.DynamicType;
 import 
org.assertj.core.internal.bytebuddy.dynamic.loading.ClassLoadingStrategy;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.NoSuchBeanDefinitionException;
 import org.springframework.lang.NonNull;
+import org.springframework.util.ReflectionUtils;
 
+import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Objects;
+import java.util.Optional;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ExecutionException;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.SynchronousQueue;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
 import java.util.concurrent.locks.ReentrantLock;
 import java.util.stream.Collectors;
 
+import static com.qq.tars.common.util.Constants.default_core_pool_size;
+import static com.qq.tars.common.util.Constants.default_max_pool_size;
+
 /**
  * Tars config cache.
  */
@@ -85,11 +102,60 @@ public final class ApplicationConfigCache {
     private final ConcurrentHashMap<String, List<TarsUpstream>> 
refreshUpstreamCache = new ConcurrentHashMap<>();
     
     private final Communicator communicator;
-    
+
+    private final ThreadFactory factory = 
ShenyuThreadFactory.create("shenyu-tars", true);
+
+    private ThreadPoolExecutor threadPool;
+
     private ApplicationConfigCache() {
-        communicator = 
CommunicatorFactory.getInstance().getCommunicator(CommunicatorConfig.getDefault());
+        TarsRegisterConfig config = 
Singleton.INST.get(TarsRegisterConfig.class);
+        if (Objects.isNull(config) || 
StringUtils.isEmpty(config.getThreadpool())) {
+            CommunicatorConfig communicatorConfig = 
CommunicatorConfig.getDefault()
+                    
.setCorePoolSize(Optional.ofNullable(config.getCorethreads()).orElse(default_core_pool_size))
+                    
.setMaxPoolSize(Optional.ofNullable(config.getThreads()).orElse(default_max_pool_size))
+                    
.setQueueSize(Optional.ofNullable(config.getQueues()).orElse(20000));
+            communicator = 
CommunicatorFactory.getInstance().getCommunicator(communicatorConfig);
+        } else {
+            communicator = 
CommunicatorFactory.getInstance().getCommunicator(CommunicatorConfig.getDefault());
+            initThreadPool(config);
+            if (Objects.nonNull(threadPool)) {
+                Field field = ReflectionUtils.findField(Communicator.class, 
"threadPoolExecutor");
+                ReflectionUtils.makeAccessible(field);
+                ReflectionUtils.setField(field, communicator, threadPool);
+            }
+        }
+
     }
-    
+
+    /**
+     * init thread pool.
+     */
+    private void initThreadPool(final TarsRegisterConfig config) {
+        if (Objects.nonNull(threadPool)) {
+            return;
+        }
+        switch (config.getThreadpool()) {
+            case Constants.SHARED:
+                try {
+                    threadPool = 
SpringBeanUtils.getInstance().getBean(ShenyuThreadPoolExecutor.class);
+                    return;
+                } catch (NoSuchBeanDefinitionException t) {
+                    throw new ShenyuException("shared thread pool is not 
enable, config ${shenyu.sharedPool.enable} in your xml/yml !", t);
+                }
+            case Constants.FIXED:
+            case Constants.EAGER:
+            case Constants.LIMITED:
+                throw new UnsupportedOperationException();
+            case Constants.CACHED:
+            default:
+                int corePoolSize = 
Optional.ofNullable(config.getCorethreads()).orElse(0);
+                int maximumPoolSize = 
Optional.ofNullable(config.getThreads()).orElse(Integer.MAX_VALUE);
+                int queueSize = 
Optional.ofNullable(config.getQueues()).orElse(0);
+                threadPool = new ThreadPoolExecutor(corePoolSize, 
maximumPoolSize, 60L, TimeUnit.SECONDS,
+                        queueSize > 0 ? new LinkedBlockingQueue<>(queueSize) : 
new SynchronousQueue<>(), factory);
+        }
+    }
+
     /**
      * Get reference config.
      *
diff --git 
a/shenyu-plugin/shenyu-plugin-tars/src/main/java/org/apache/shenyu/plugin/tars/handler/TarsPluginDataHandler.java
 
b/shenyu-plugin/shenyu-plugin-tars/src/main/java/org/apache/shenyu/plugin/tars/handler/TarsPluginDataHandler.java
index 22678049b..e8bbf5e80 100644
--- 
a/shenyu-plugin/shenyu-plugin-tars/src/main/java/org/apache/shenyu/plugin/tars/handler/TarsPluginDataHandler.java
+++ 
b/shenyu-plugin/shenyu-plugin-tars/src/main/java/org/apache/shenyu/plugin/tars/handler/TarsPluginDataHandler.java
@@ -17,8 +17,12 @@
 
 package org.apache.shenyu.plugin.tars.handler;
 
+import org.apache.shenyu.common.dto.PluginData;
 import org.apache.shenyu.common.dto.SelectorData;
+import org.apache.shenyu.common.dto.convert.plugin.TarsRegisterConfig;
 import org.apache.shenyu.common.enums.PluginEnum;
+import org.apache.shenyu.common.utils.GsonUtils;
+import org.apache.shenyu.common.utils.Singleton;
 import org.apache.shenyu.plugin.base.handler.PluginDataHandler;
 import org.apache.shenyu.plugin.tars.cache.ApplicationConfigCache;
 
@@ -28,6 +32,21 @@ import java.util.Objects;
  * The type tars plugin data handler.
  */
 public class TarsPluginDataHandler implements PluginDataHandler {
+
+    @Override
+    public void handlerPlugin(final PluginData pluginData) {
+        if (Objects.nonNull(pluginData) && 
Boolean.TRUE.equals(pluginData.getEnabled())) {
+            TarsRegisterConfig tarsRegisterConfig = 
GsonUtils.getInstance().fromJson(pluginData.getConfig(), 
TarsRegisterConfig.class);
+            TarsRegisterConfig exist = 
Singleton.INST.get(TarsRegisterConfig.class);
+            if (Objects.isNull(tarsRegisterConfig)) {
+                return;
+            }
+            if (Objects.isNull(exist) || !tarsRegisterConfig.equals(exist)) {
+                // If it is null, cache it
+                Singleton.INST.single(TarsRegisterConfig.class, 
tarsRegisterConfig);
+            }
+        }
+    }
     
     @Override
     public String pluginNamed() {
diff --git 
a/shenyu-web/src/main/java/org/apache/shenyu/web/configuration/ShenyuThreadPoolConfiguration.java
 
b/shenyu-web/src/main/java/org/apache/shenyu/web/configuration/ShenyuThreadPoolConfiguration.java
index c8aadd539..31cf19f00 100644
--- 
a/shenyu-web/src/main/java/org/apache/shenyu/web/configuration/ShenyuThreadPoolConfiguration.java
+++ 
b/shenyu-web/src/main/java/org/apache/shenyu/web/configuration/ShenyuThreadPoolConfiguration.java
@@ -84,7 +84,7 @@ public class ShenyuThreadPoolConfiguration {
     }
 
     /**
-     * crate shenyu shared thread pool executor.
+     * create shenyu shared thread pool executor.
      *
      * @param shenyuConfig the shenyu config
      * @param provider     the queue bean provider

Reply via email to