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 1d5ff8e8d30..6d7bc9b6476 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 @@ -107,7 +107,7 @@ public Service getService() { @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()); } @@ -115,15 +115,6 @@ public void onApplicationEvent(ContextRefreshedEvent event) { } } - 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 { @@ -251,7 +242,7 @@ && getInterface() != null && getInterface().length() > 0 setPath(beanName); } } - if (!isDelay()) { + if (!supportedApplicationListener) { export(); } }