Skip to content

Commit

Permalink
refactor: register plugin application context after context refreshed (
Browse files Browse the repository at this point in the history
…#4092)

#### What type of PR is this?
/kind improvement
/area core
/area plugin

#### What this PR does / why we need it:
插件的 ApplicationContext 刷新之后在注册到 Registry 中

#### Does this PR introduce a user-facing change?

```release-note
None
```
  • Loading branch information
guqing authored Jun 26, 2023
1 parent 34d0f93 commit 532d7e0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ private PluginApplicationContext createPluginApplicationContext(String pluginId)
log.debug("Total millis: {} ms -> {}", stopWatch.getTotalTimeMillis(),
stopWatch.prettyPrint());

contextRegistry.register(pluginId, pluginApplicationContext);
return pluginApplicationContext;
}

Expand Down Expand Up @@ -126,6 +125,8 @@ private void initApplicationContext(String pluginId) {
pluginApplicationContext.refresh();
stopWatch.stop();

contextRegistry.register(pluginId, pluginApplicationContext);

log.debug("initApplicationContext total millis: {} ms -> {}",
stopWatch.getTotalTimeMillis(), stopWatch.prettyPrint());
}
Expand Down

0 comments on commit 532d7e0

Please sign in to comment.