Skip to content

Commit

Permalink
Polish apache#6558 : [Enhancement] Preparing Dubbo Config Beans on Re…
Browse files Browse the repository at this point in the history
…ferenceBean#getObject()
  • Loading branch information
mercyblitz committed Aug 6, 2020
1 parent 142cbbe commit 75c68c1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,10 @@ public synchronized void init() {
return;
}


if (bootstrap == null) {
bootstrap = DubboBootstrap.getInstance();
bootstrap.init();
bootstrap.initialize();
}

checkAndUpdateSubConfigs();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,17 @@ public boolean isSingleton() {
return true;
}

/**
* Overrides {@link ReferenceConfig#checkAndUpdateSubConfigs()}
*
* @since 2.7.9
*/
@Override
public void checkAndUpdateSubConfigs() {
prepareDubboConfigBeans();
super.checkAndUpdateSubConfigs();
}

/**
* Initializes there Dubbo's Config Beans before @Reference bean autowiring
*/
Expand All @@ -100,9 +111,6 @@ private void prepareDubboConfigBeans() {
@SuppressWarnings({"unchecked"})
public void afterPropertiesSet() throws Exception {

// Initializes Dubbo's Config Beans before @Reference bean autowiring
prepareDubboConfigBeans();

// lazy init by default.
if (init == null) {
init = false;
Expand Down

0 comments on commit 75c68c1

Please sign in to comment.