Skip to content

Spring-boot combines PF4J to implement plug-in definition, development, packaging, upload, load, unload, start, stop, enable, disable, use and other functions。spring-boot结合PF4J实现插件定义、开发、打包、上传、加载、卸载、启动、停止、启用、停用、使用等功能

License

Notifications You must be signed in to change notification settings

clyoudu/pf4j-spring

Repository files navigation

pf4j-spring

Spring-boot combines PF4J to implement plug-in definition, development, packaging, upload, load, unload, start, stop, enable, disable, use and other functions

Modules

Build & Run

git clone https://github.com/clyoudu/pf4j-spring.git

Then edit pf4j-spring/demo/manager/src/main/resources/application.yml, change spring.pf4j.path to another dir

cd pf4j-spring
mvn clean package
cd demo/manager/target
java -jar manager-1.0.0-SNAPSHOT.jar

Open http://localhost:8080, you will see page like this

Plugin Management:

  1. You can upload plugins jar in demo/plugins/*/target/*.jar
  2. Click 'Reload' button, then the plugin list will refresh automatically
  3. Load/Unload/Start/Stop/Enable/Disable/Delete operations are available for different plugin state

Business Feature:

  1. With plugin state changed, extension buttons list changed
  2. Click buttons, a message displayed as plugin extension expected

TODO

[] Managing & Using plugin through spring application context is not tested

Plugin Framework for Java

PF4J

About

Spring-boot combines PF4J to implement plug-in definition, development, packaging, upload, load, unload, start, stop, enable, disable, use and other functions。spring-boot结合PF4J实现插件定义、开发、打包、上传、加载、卸载、启动、停止、启用、停用、使用等功能

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages