diff --git a/application/src/main/java/run/halo/app/plugin/PluginApplicationInitializer.java b/application/src/main/java/run/halo/app/plugin/PluginApplicationInitializer.java index 924110a46a..c17ae31f34 100644 --- a/application/src/main/java/run/halo/app/plugin/PluginApplicationInitializer.java +++ b/application/src/main/java/run/halo/app/plugin/PluginApplicationInitializer.java @@ -95,7 +95,6 @@ private PluginApplicationContext createPluginApplicationContext(String pluginId) log.debug("Total millis: {} ms -> {}", stopWatch.getTotalTimeMillis(), stopWatch.prettyPrint()); - contextRegistry.register(pluginId, pluginApplicationContext); return pluginApplicationContext; } @@ -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()); }