From 178e2ee4fa4f3c5ff100c755b93a3e7ca628a8af Mon Sep 17 00:00:00 2001 From: Hank CP Date: Mon, 27 Nov 2023 15:36:44 +0800 Subject: [PATCH] update docs --- demo-app/src/main/resources/application.yml | 2 +- docs/configuration.md | 6 ++++-- .../java/org/laxture/sbp/spring/boot/SbpProperties.java | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/demo-app/src/main/resources/application.yml b/demo-app/src/main/resources/application.yml index 9c039bb..95c5533 100644 --- a/demo-app/src/main/resources/application.yml +++ b/demo-app/src/main/resources/application.yml @@ -30,7 +30,7 @@ spring: database-platform: org.hibernate.dialect.PostgreSQL9Dialect controller: base-path: sbp -# custom-plugin-loaders: +# custom-plugin-loader: # - demo.sbp.app.CustomPluginLoader flyway: enabled: true diff --git a/docs/configuration.md b/docs/configuration.md index 66ed4a4..b6353bf 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -36,9 +36,11 @@ with two options plugins home folder, relative to project working DIR. Default `plugins` -##### `spring.sbp.custom-plugin-loaders` +##### `spring.sbp.custom-plugin-loader` Allows to provide custom plugin loaders. Provided custom `PluginLoader` should have -a constructor with one argument that accepts `PluginManager`. +a constructor with one argument that accepts `PluginManager`. By default sbp loads plugin resources (classes and resource files) +from file-system or single jar file. If you want to load plugin resources from other format, like fat-jar, you +will have to provide custom `PluginLoader`. ##### `spring.sbp.plugin-profiles`: Specify Spring profiles to be used when creating plugins' `ApplicationContext` environment. With profile `plugin` by default. diff --git a/sbp-spring-boot-starter/src/main/java/org/laxture/sbp/spring/boot/SbpProperties.java b/sbp-spring-boot-starter/src/main/java/org/laxture/sbp/spring/boot/SbpProperties.java index 47e9330..8d2d47c 100644 --- a/sbp-spring-boot-starter/src/main/java/org/laxture/sbp/spring/boot/SbpProperties.java +++ b/sbp-spring-boot-starter/src/main/java/org/laxture/sbp/spring/boot/SbpProperties.java @@ -77,7 +77,7 @@ public class SbpProperties { */ private String pluginsRoot = "plugins"; /** - * Allows to provide custom plugin loaders + * Allows to provide custom plugin loaders. */ private Class customPluginLoader; /**