This is an automated email from the ASF dual-hosted git repository.
wangchengming pushed a commit to branch 3.3
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.3 by this push:
new 4af95dc7c0 get moduleModel at
ReferenceBeanManager#prepareReferenceBeans method to avoid getting null result
(#15769)
4af95dc7c0 is described below
commit 4af95dc7c0afd465a373d80acac0ad3d92c994db
Author: zrlw <[email protected]>
AuthorDate: Mon Jan 19 10:09:50 2026 +0800
get moduleModel at ReferenceBeanManager#prepareReferenceBeans method to
avoid getting null result (#15769)
---
.../org/apache/dubbo/config/spring/reference/ReferenceBeanManager.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/reference/ReferenceBeanManager.java
b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/reference/ReferenceBeanManager.java
index eabe50ad32..741797cc04 100644
---
a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/reference/ReferenceBeanManager.java
+++
b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/reference/ReferenceBeanManager.java
@@ -141,7 +141,6 @@ public class ReferenceBeanManager implements
ApplicationContextAware {
@Override
public void setApplicationContext(ApplicationContext applicationContext)
throws BeansException {
this.applicationContext = applicationContext;
- moduleModel = DubboBeanUtils.getModuleModel(applicationContext);
}
/**
@@ -150,6 +149,8 @@ public class ReferenceBeanManager implements
ApplicationContextAware {
* @throws Exception
*/
public void prepareReferenceBeans() throws Exception {
+ // get moduleModel here (called by
DubboConfigBeanInitializer#afterPropertiesSet) to avoid getting null result.
+ moduleModel = DubboBeanUtils.getModuleModel(applicationContext);
initialized = true;
for (ReferenceBean referenceBean : getReferences()) {
initReferenceBean(referenceBean);