generated from halo-dev/plugin-starter
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: cleanup deprecated constructor for base plugin (#14)
### What this PR does? 移除对已过时的 PluginWrapper 的引用 see also halo-dev/halo#6243 ```release-note None ```
- Loading branch information
Showing
1 changed file
with
4 additions
and
21 deletions.
There are no files selected for viewing
25 changes: 4 additions & 21 deletions
25
src/main/java/run/halo/plugin/textdiagram/StarterPlugin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
|
||
/** | ||
* <p>Plugin main class to manage the lifecycle of the plugin.</p> | ||
* <p>This class must be public and have a public constructor.</p> | ||
* <p>Only one main class extending {@link BasePlugin} is allowed per plugin.</p> | ||
* | ||
* @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); | ||
} | ||
} |