This is an automated email from the ASF dual-hosted git repository. liujun pushed a commit to branch dev-metadata in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git
commit 220c9da452acb0ae9aebc965bc00718989dad3fd Author: 田小波 <[email protected]> AuthorDate: Tue Oct 30 17:12:38 2018 +0800 cherry-pick 4d0a36c435ca59bfcf909c0e76fa2ab024fb7408 from master 重构 ServiceBean 的 isDelay 方法,使其更符合语义 --- .../java/org/apache/dubbo/config/spring/ServiceBean.java | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/ServiceBean.java b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/ServiceBean.java index b644d62..e6bc114 100644 --- a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/ServiceBean.java +++ b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/ServiceBean.java @@ -108,7 +108,7 @@ public class ServiceBean<T> extends ServiceConfig<T> implements InitializingBean @Override public void onApplicationEvent(ContextRefreshedEvent event) { - if (isDelay() && !isExported() && !isUnexported()) { + if (!isExported() && !isUnexported()) { if (logger.isInfoEnabled()) { logger.info("The service ready on spring started. service: " + getInterface()); } @@ -116,15 +116,6 @@ public class ServiceBean<T> extends ServiceConfig<T> implements InitializingBean } } - private boolean isDelay() { - Integer delay = getDelay(); - ProviderConfig provider = getProvider(); - if (delay == null && provider != null) { - delay = provider.getDelay(); - } - return supportedApplicationListener && (delay == null || delay == -1); - } - @Override @SuppressWarnings({"unchecked", "deprecation"}) public void afterPropertiesSet() throws Exception { @@ -264,7 +255,7 @@ public class ServiceBean<T> extends ServiceConfig<T> implements InitializingBean checkAndUpdateSubConfigs(); - if (!isDelay()) { + if (!supportedApplicationListener) { export(); } }
