This is an automated email from the ASF dual-hosted git repository.

albumenj pushed a commit to branch 3.1
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/3.1 by this push:
     new 29e4e4235b fix sofa 非dubbo 子模块启动时获取 发生`No bean named 
referenceAnnotationBeanPostProcessor` 异常 (#10451)
29e4e4235b is described below

commit 29e4e4235b3dfdfdd4cd562bdc835bbd779634f4
Author: liufeiyu1002 <[email protected]>
AuthorDate: Sun Aug 14 10:50:39 2022 +0800

    fix sofa 非dubbo 子模块启动时获取 发生`No bean named 
referenceAnnotationBeanPostProcessor` 异常 (#10451)
---
 .../config/spring/context/DubboInfraBeanRegisterPostProcessor.java   | 5 +++++
 1 file changed, 5 insertions(+)

diff --git 
a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/context/DubboInfraBeanRegisterPostProcessor.java
 
b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/context/DubboInfraBeanRegisterPostProcessor.java
index 2f700127a2..d9f4f2b2ce 100644
--- 
a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/context/DubboInfraBeanRegisterPostProcessor.java
+++ 
b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/context/DubboInfraBeanRegisterPostProcessor.java
@@ -89,6 +89,11 @@ public class DubboInfraBeanRegisterPostProcessor implements 
BeanDefinitionRegist
 
         // register ConfigManager singleton
         beanFactory.registerSingleton(ConfigManager.BEAN_NAME, 
applicationModel.getApplicationConfigManager());
+
+        // fix https://github.com/apache/dubbo/issues/10278
+        if (registry != null){
+            registry.removeBeanDefinition(BEAN_NAME);
+        }
     }
 
     @Override

Reply via email to