From 730fe528f1e20733cf4e9b0aacc8587516a6e8a3 Mon Sep 17 00:00:00 2001 From: liuzg-coder Date: Wed, 11 Oct 2023 10:30:55 +0800 Subject: [PATCH] refactor: modify modulemodel obtain from beanfactory --- .../config/spring/context/DubboConfigBeanInitializer.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/context/DubboConfigBeanInitializer.java b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/context/DubboConfigBeanInitializer.java index 71e9ace4a62..7515466669b 100644 --- a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/context/DubboConfigBeanInitializer.java +++ b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/context/DubboConfigBeanInitializer.java @@ -42,8 +42,6 @@ import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.BeanFactoryAware; import org.springframework.beans.factory.InitializingBean; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import java.util.List; @@ -68,9 +66,6 @@ public class DubboConfigBeanInitializer implements BeanFactoryAware, Initializin private ReferenceBeanManager referenceBeanManager; private ConfigManager configManager; - - @Autowired - @Qualifier("org.apache.dubbo.rpc.model.ModuleModel") private ModuleModel moduleModel; @Override @@ -87,6 +82,7 @@ private void init() { if (initialized.compareAndSet(false, true)) { referenceBeanManager = beanFactory.getBean(ReferenceBeanManager.BEAN_NAME, ReferenceBeanManager.class); configManager = DubboBeanUtils.getConfigManager(beanFactory); + moduleModel = DubboBeanUtils.getModuleModel(beanFactory); try { prepareDubboConfigBeans(); referenceBeanManager.prepareReferenceBeans();