Skip to content

Latest commit

 

History

History
39 lines (33 loc) · 1.59 KB

README.md

File metadata and controls

39 lines (33 loc) · 1.59 KB

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