diff --git a/src/main/java/run/halo/plugin/textdiagram/StarterPlugin.java b/src/main/java/run/halo/plugin/textdiagram/StarterPlugin.java index 36dfdbf..797c893 100644 --- a/src/main/java/run/halo/plugin/textdiagram/StarterPlugin.java +++ b/src/main/java/run/halo/plugin/textdiagram/StarterPlugin.java @@ -1,31 +1,14 @@ package run.halo.plugin.textdiagram; -import org.pf4j.PluginWrapper; import org.springframework.stereotype.Component; + import run.halo.app.plugin.BasePlugin; +import run.halo.app.plugin.PluginContext; -/** - *

Plugin main class to manage the lifecycle of the plugin.

- *

This class must be public and have a public constructor.

- *

Only one main class extending {@link BasePlugin} is allowed per plugin.

- * - * @author guqing - * @since 1.0.0 - */ @Component public class StarterPlugin extends BasePlugin { - public StarterPlugin(PluginWrapper wrapper) { - super(wrapper); - } - - @Override - public void start() { - System.out.println("插件启动成功!"); - } - - @Override - public void stop() { - System.out.println("插件停止!"); + public StarterPlugin(PluginContext context) { + super(context); } }