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 924110a46..c17ae31f3 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 @@ 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()); }