From 17effa7f903c928d5e3beb5567ffe8e008e63de8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=B6=E6=97=A0=E4=B8=A4=E4=B8=B6?= <442367943@qq.com> Date: Tue, 9 Apr 2019 10:16:05 +0800 Subject: [PATCH] Make `dynamic` default true to promise that the url will delete from zk whenever provider shutdown. (#3824) --- .../java/com/alibaba/dubbo/config/annotation/Service.java | 2 +- .../java/org/apache/dubbo/config/AbstractServiceConfig.java | 2 +- .../main/java/org/apache/dubbo/config/annotation/Service.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dubbo-compatible/src/main/java/com/alibaba/dubbo/config/annotation/Service.java b/dubbo-compatible/src/main/java/com/alibaba/dubbo/config/annotation/Service.java index 1919a1ec295..6518dc8f6aa 100644 --- a/dubbo-compatible/src/main/java/com/alibaba/dubbo/config/annotation/Service.java +++ b/dubbo-compatible/src/main/java/com/alibaba/dubbo/config/annotation/Service.java @@ -47,7 +47,7 @@ boolean deprecated() default false; - boolean dynamic() default false; + boolean dynamic() default true; String accesslog() default ""; diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractServiceConfig.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractServiceConfig.java index ba7f129355f..24ac6a2d752 100644 --- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractServiceConfig.java +++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractServiceConfig.java @@ -74,7 +74,7 @@ public abstract class AbstractServiceConfig extends AbstractInterfaceConfig { * after the service registered,and it needs to be enabled manually; if you want to disable the service, you also need * manual processing */ - protected Boolean dynamic = false; + protected Boolean dynamic = true; /** * Whether to use token diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/annotation/Service.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/annotation/Service.java index 2e6f9b684a7..9db3ffdcdc8 100644 --- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/annotation/Service.java +++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/annotation/Service.java @@ -79,9 +79,9 @@ boolean deprecated() default false; /** - * Whether the service is dynamic, default value is false + * Whether the service is dynamic, default value is true */ - boolean dynamic() default false; + boolean dynamic() default true; /** * Access log for the service, default value is ""