From f7cd26567e979ca05b976738538768e1b41bca6a Mon Sep 17 00:00:00 2001 From: xiuyuhang <442367943@qq.com> Date: Mon, 8 Apr 2019 14:42:33 +0800 Subject: [PATCH] Make `dynamic` default true to promise that the url will delete from zk whenever provider shutdown. --- .../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 ""