From 59096a9e4b6433e5159d64c670e732c0e62df015 Mon Sep 17 00:00:00 2001 From: guqing <38999863+guqing@users.noreply.github.com> Date: Tue, 2 Jul 2024 11:25:22 +0800 Subject: [PATCH] chore: remove deprecated plugin wrapper (#379) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### What this PR does? 移除已经过时的 PluginWrapper 引用 ```release-note None ``` --- docs/developer-guide/plugin/examples/todolist.md | 12 ++++++------ .../developer-guide/plugin/examples/todolist.md | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/developer-guide/plugin/examples/todolist.md b/docs/developer-guide/plugin/examples/todolist.md index c7e17a0..be702c5 100644 --- a/docs/developer-guide/plugin/examples/todolist.md +++ b/docs/developer-guide/plugin/examples/todolist.md @@ -61,14 +61,14 @@ description: 这个例子展示了如何开发 Todo List 插件 ```java package run.halo.tutorial; - import org.pf4j.PluginWrapper; + import run.halo.app.plugin.PluginContext; import org.springframework.stereotype.Component; import run.halo.app.plugin.BasePlugin; @Component public class TodoListPlugin extends BasePlugin { - public TodoListPlugin(PluginWrapper wrapper) { - super(wrapper); + public TodoListPlugin(PluginContext pluginContext) { + super(pluginContext); } } ``` @@ -154,9 +154,9 @@ public class Todo extends AbstractExtension { public class TodoListPlugin extends BasePlugin { + private final SchemeManager schemeManager; -- public TodoListPlugin(PluginWrapper wrapper) { -+ public TodoListPlugin(PluginWrapper wrapper, SchemeManager schemeManager) { - super(wrapper); +- public TodoListPlugin(PluginContext pluginContext) { ++ public TodoListPlugin(PluginContext pluginContext, SchemeManager schemeManager) { + super(pluginContext); + this.schemeManager = schemeManager; } diff --git a/versioned_docs/version-2.17/developer-guide/plugin/examples/todolist.md b/versioned_docs/version-2.17/developer-guide/plugin/examples/todolist.md index c7e17a0..be702c5 100644 --- a/versioned_docs/version-2.17/developer-guide/plugin/examples/todolist.md +++ b/versioned_docs/version-2.17/developer-guide/plugin/examples/todolist.md @@ -61,14 +61,14 @@ description: 这个例子展示了如何开发 Todo List 插件 ```java package run.halo.tutorial; - import org.pf4j.PluginWrapper; + import run.halo.app.plugin.PluginContext; import org.springframework.stereotype.Component; import run.halo.app.plugin.BasePlugin; @Component public class TodoListPlugin extends BasePlugin { - public TodoListPlugin(PluginWrapper wrapper) { - super(wrapper); + public TodoListPlugin(PluginContext pluginContext) { + super(pluginContext); } } ``` @@ -154,9 +154,9 @@ public class Todo extends AbstractExtension { public class TodoListPlugin extends BasePlugin { + private final SchemeManager schemeManager; -- public TodoListPlugin(PluginWrapper wrapper) { -+ public TodoListPlugin(PluginWrapper wrapper, SchemeManager schemeManager) { - super(wrapper); +- public TodoListPlugin(PluginContext pluginContext) { ++ public TodoListPlugin(PluginContext pluginContext, SchemeManager schemeManager) { + super(pluginContext); + this.schemeManager = schemeManager; }