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/12/18 07:46:06 UTC
[dubbo] branch 2.7.5-release updated: [Dubbo-5495] The dubbo
services can't be exported (#5503)
This is an automated email from the ASF dual-hosted git repository.
liujun pushed a commit to branch 2.7.5-release
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/2.7.5-release by this push:
new 5d3ed0c [Dubbo-5495] The dubbo services can't be exported (#5503)
5d3ed0c is described below
commit 5d3ed0ce4f4e85bd318bf18ae2de8f82b272afe8
Author: Mercy Ma <me...@gmail.com>
AuthorDate: Wed Dec 18 15:45:50 2019 +0800
[Dubbo-5495] The dubbo services can't be exported (#5503)
Fixes #5495
---
.../dubbo/config/spring/schema/DubboNamespaceHandler.java | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/schema/DubboNamespaceHandler.java b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/schema/DubboNamespaceHandler.java
index 82a4bd7..924d70a 100644
--- a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/schema/DubboNamespaceHandler.java
+++ b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/schema/DubboNamespaceHandler.java
@@ -31,6 +31,7 @@ import org.apache.dubbo.config.spring.ConfigCenterBean;
import org.apache.dubbo.config.spring.ReferenceBean;
import org.apache.dubbo.config.spring.ServiceBean;
import org.apache.dubbo.config.spring.beans.factory.config.ConfigurableSourceBeanMetadataElement;
+import org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener;
import org.apache.dubbo.config.spring.context.DubboLifecycleComponentApplicationListener;
import com.alibaba.spring.util.AnnotatedBeanDefinitionRegistryUtils;
@@ -38,6 +39,7 @@ import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
import org.springframework.beans.factory.xml.ParserContext;
+import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.AnnotationConfigUtils;
import org.w3c.dom.Element;
@@ -84,22 +86,23 @@ public class DubboNamespaceHandler extends NamespaceHandlerSupport implements Co
public BeanDefinition parse(Element element, ParserContext parserContext) {
BeanDefinitionRegistry registry = parserContext.getRegistry();
registerAnnotationConfigProcessors(registry);
- registerDubboLifecycleComponentApplicationListener(registry);
+ registerApplicationListeners(registry);
BeanDefinition beanDefinition = super.parse(element, parserContext);
setSource(beanDefinition);
return beanDefinition;
}
/**
- * Register {@link DubboLifecycleComponentApplicationListener} as a Spring Bean
+ * Register {@link ApplicationListener ApplicationListeners} as a Spring Bean
*
* @param registry {@link BeanDefinitionRegistry}
- * @see DubboLifecycleComponentApplicationListener
+ * @see ApplicationListener
* @see AnnotatedBeanDefinitionRegistryUtils#registerBeans(BeanDefinitionRegistry, Class[])
* @since 2.7.5
*/
- private void registerDubboLifecycleComponentApplicationListener(BeanDefinitionRegistry registry) {
+ private void registerApplicationListeners(BeanDefinitionRegistry registry) {
registerBeans(registry, DubboLifecycleComponentApplicationListener.class);
+ registerBeans(registry, DubboBootstrapApplicationListener.class);
}
/**