You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2019/06/25 07:56:31 UTC

[dubbo] branch 2.7.3-release updated: fix qos configuration cannot work after added 'qos-enable' style support (#4378)

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

liujun pushed a commit to branch 2.7.3-release
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/2.7.3-release by this push:
     new a2f0d9a  fix qos configuration cannot work after added 'qos-enable' style support (#4378)
a2f0d9a is described below

commit a2f0d9a20d8989fa3fe5d48c9899ad1394e296d3
Author: cvictory <sh...@gmail.com>
AuthorDate: Tue Jun 25 15:52:54 2019 +0800

    fix qos configuration cannot work after added 'qos-enable' style support (#4378)
    
    fixes #4377
---
 .../dubbo/common/constants/QosConstants.java       | 12 ++++++---
 .../org/apache/dubbo/config/ApplicationConfig.java | 31 +++++++++++-----------
 2 files changed, 25 insertions(+), 18 deletions(-)

diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/constants/QosConstants.java b/dubbo-common/src/main/java/org/apache/dubbo/common/constants/QosConstants.java
index 6815dae..cabac0e 100644
--- a/dubbo-common/src/main/java/org/apache/dubbo/common/constants/QosConstants.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/common/constants/QosConstants.java
@@ -22,9 +22,15 @@ package org.apache.dubbo.common.constants;
  */
 public interface QosConstants {
 
-    String QOS_ENABLE = "qos-enable";
+    String QOS_ENABLE = "qos.enable";
 
-    String QOS_PORT = "qos-port";
+    String QOS_PORT = "qos.port";
 
-    String ACCEPT_FOREIGN_IP = "qos-accept-foreign-ip";
+    String ACCEPT_FOREIGN_IP = "qos.accept.foreign.ip";
+
+    String QOS_ENABLE_COMPATIBLE = "qos-enable";
+
+    String QOS_PORT_COMPATIBLE = "qos-port";
+
+    String ACCEPT_FOREIGN_IP_COMPATIBLE = "qos-accept-foreign-ip";
 }
diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ApplicationConfig.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ApplicationConfig.java
index 83fc6db..824a0dd 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ApplicationConfig.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ApplicationConfig.java
@@ -30,8 +30,11 @@ import static org.apache.dubbo.common.constants.CommonConstants.APPLICATION_KEY;
 import static org.apache.dubbo.common.constants.CommonConstants.DUMP_DIRECTORY;
 import static org.apache.dubbo.common.constants.CommonConstants.SHUTDOWN_WAIT_KEY;
 import static org.apache.dubbo.common.constants.QosConstants.ACCEPT_FOREIGN_IP;
+import static org.apache.dubbo.common.constants.QosConstants.ACCEPT_FOREIGN_IP_COMPATIBLE;
 import static org.apache.dubbo.common.constants.QosConstants.QOS_ENABLE;
+import static org.apache.dubbo.common.constants.QosConstants.QOS_ENABLE_COMPATIBLE;
 import static org.apache.dubbo.common.constants.QosConstants.QOS_PORT;
+import static org.apache.dubbo.common.constants.QosConstants.QOS_PORT_COMPATIBLE;
 import static org.apache.dubbo.config.Constants.ARCHITECTURE;
 import static org.apache.dubbo.config.Constants.DEVELOPMENT_ENVIRONMENT;
 import static org.apache.dubbo.config.Constants.ENVIRONMENT;
@@ -317,36 +320,34 @@ public class ApplicationConfig extends AbstractConfig {
         this.qosAcceptForeignIp = qosAcceptForeignIp;
     }
 
-    @Deprecated
-    @Parameter(key = "qos.enable", excluded = true)
-    public Boolean getQosEnableDeprecated() {
+    /**
+     * The format is the same as the springboot, including: getQosEnableCompatible(), getQosPortCompatible(), getQosAcceptForeignIpCompatible().
+     * @return
+     */
+    @Parameter(key = QOS_ENABLE_COMPATIBLE, excluded = true)
+    public Boolean getQosEnableCompatible() {
         return getQosEnable();
     }
 
-    @Deprecated
-    public void setQosEnableDeprecated(Boolean qosEnable) {
+    public void setQosEnableCompatible(Boolean qosEnable) {
         setQosEnable(qosEnable);
     }
 
-    @Deprecated
-    @Parameter(key = "qos.port", excluded = true)
-    public Integer getQosPortDeprecated() {
+    @Parameter(key = QOS_PORT_COMPATIBLE, excluded = true)
+    public Integer getQosPortCompatible() {
         return getQosPort();
     }
 
-    @Deprecated
-    public void setQosPortDeprecated(Integer qosPort) {
+    public void setQosPortCompatible(Integer qosPort) {
         this.setQosPort(qosPort);
     }
 
-    @Deprecated
-    @Parameter(key = "qos.accept.foreign.ip", excluded = true)
-    public Boolean getQosAcceptForeignIpDeprecated() {
+    @Parameter(key = ACCEPT_FOREIGN_IP_COMPATIBLE, excluded = true)
+    public Boolean getQosAcceptForeignIpCompatible() {
         return this.getQosAcceptForeignIp();
     }
 
-    @Deprecated
-    public void setQosAcceptForeignIpDeprecated(Boolean qosAcceptForeignIp) {
+    public void setQosAcceptForeignIpCompatible(Boolean qosAcceptForeignIp) {
         this.setQosAcceptForeignIp(qosAcceptForeignIp);
     }