mirror of https://github.com/halo-dev/halo
refactor: register plugin application context after context refreshed (#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 ```pull/4061/head
parent
34d0f9369b
commit
532d7e0632
|
@ -95,7 +95,6 @@ public class PluginApplicationInitializer {
|
|||
log.debug("Total millis: {} ms -> {}", stopWatch.getTotalTimeMillis(),
|
||||
stopWatch.prettyPrint());
|
||||
|
||||
contextRegistry.register(pluginId, pluginApplicationContext);
|
||||
return pluginApplicationContext;
|
||||
}
|
||||
|
||||
|
@ -126,6 +125,8 @@ public class PluginApplicationInitializer {
|
|||
pluginApplicationContext.refresh();
|
||||
stopWatch.stop();
|
||||
|
||||
contextRegistry.register(pluginId, pluginApplicationContext);
|
||||
|
||||
log.debug("initApplicationContext total millis: {} ms -> {}",
|
||||
stopWatch.getTotalTimeMillis(), stopWatch.prettyPrint());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue