You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by xi...@apache.org on 2021/11/01 09:04:38 UTC

[incubator-shenyu] branch master updated: [type:refactor] optimize register properties config. (#2289)

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

xiaoyu 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 4045b3e  [type:refactor] optimize register properties config. (#2289)
4045b3e is described below

commit 4045b3e666474c183edfd884c575eeec93036db6
Author: Qicz <qi...@gmail.com>
AuthorDate: Mon Nov 1 17:04:31 2021 +0800

    [type:refactor] optimize register properties config. (#2289)
---
 .../shenyu/register/common/config/ShenyuClientConfig.java   | 13 ++++++++++---
 .../register/common/config/ShenyuRegisterCenterConfig.java  | 12 ++++++++++++
 2 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/shenyu-register-center/shenyu-register-common/src/main/java/org/apache/shenyu/register/common/config/ShenyuClientConfig.java b/shenyu-register-center/shenyu-register-common/src/main/java/org/apache/shenyu/register/common/config/ShenyuClientConfig.java
index a115732..907686c 100644
--- a/shenyu-register-center/shenyu-register-common/src/main/java/org/apache/shenyu/register/common/config/ShenyuClientConfig.java
+++ b/shenyu-register-center/shenyu-register-common/src/main/java/org/apache/shenyu/register/common/config/ShenyuClientConfig.java
@@ -25,14 +25,14 @@ import java.util.Map;
  */
 public final class ShenyuClientConfig {
     
-    private Map<String, PropertiesConfig> client = new HashMap<>();
+    private Map<String, ClientPropertiesConfig> client = new HashMap<>();
     
     /**
      * Gets client.
      *
      * @return the client
      */
-    public Map<String, PropertiesConfig> getClient() {
+    public Map<String, ClientPropertiesConfig> getClient() {
         return client;
     }
     
@@ -41,7 +41,14 @@ public final class ShenyuClientConfig {
      *
      * @param client the client
      */
-    public void setClient(final Map<String, PropertiesConfig> client) {
+    public void setClient(final Map<String, ClientPropertiesConfig> client) {
         this.client = client;
     }
+
+    /**
+     * this client properties config.
+     */
+    public static class ClientPropertiesConfig extends PropertiesConfig {
+
+    }
 }
diff --git a/shenyu-register-center/shenyu-register-common/src/main/java/org/apache/shenyu/register/common/config/ShenyuRegisterCenterConfig.java b/shenyu-register-center/shenyu-register-common/src/main/java/org/apache/shenyu/register/common/config/ShenyuRegisterCenterConfig.java
index 8ea1bae..a58e994 100644
--- a/shenyu-register-center/shenyu-register-common/src/main/java/org/apache/shenyu/register/common/config/ShenyuRegisterCenterConfig.java
+++ b/shenyu-register-center/shenyu-register-common/src/main/java/org/apache/shenyu/register/common/config/ShenyuRegisterCenterConfig.java
@@ -17,6 +17,8 @@
 
 package org.apache.shenyu.register.common.config;
 
+import java.util.Properties;
+
 /**
  * Governance center configuration.
  */
@@ -26,6 +28,16 @@ public final class ShenyuRegisterCenterConfig extends PropertiesConfig {
     
     private String serverLists;
 
+    public ShenyuRegisterCenterConfig() {
+
+    }
+
+    public ShenyuRegisterCenterConfig(final String registerType, final String serverLists, final Properties props) {
+        this.registerType = registerType;
+        this.serverLists = serverLists;
+        this.setProps(props);
+    }
+
     /**
      * getRegisterType.
      *