Configurations for main application's PluginManager.
set to true to enable sbp. Default false.
auto start plugin when main app is ready. Default true
Plugins disabled by default
Plugins enabled by default, prior to disabled-plugins
where to load plugin classes, relative to plugin folder.
* for IDEA
spring: sbp: classes-directories: - "out/production/classes" - "out/production/resources"
where to load jar libs, relative to plugin folder.
with two options * DEPLOYMENT: load plugin in jar/zip format. * DEVELOPMENT: load plugin from build folder with Java class file.
plugins home folder, relative to project working DIR.
Default plugins
Allows to provide custom plugin loaders. Provided custom PluginLoader
should have
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
.
Specify Spring profiles to be used when creating plugins' ApplicationContext
environment. With profile plugin
by default.
You could use it to config plugin globally.
Check Demo for example.
Specify properties to be used when creating plugins' ApplicationContext
environment.
You could use it to config plugin globally.
Check Demo for example.
The system version used for comparisons to the plugin requires attribute.
If this property is set, PluginController
will be registered to
help manage plugin via REST api.
Check Demo for example.
Configurations for individual plugins.
If a class file existed in app classpath and
plugin classpath at the same time, PluginClassLoader
will try to load it
from plugin classpath first. This will cause ClassCastException
when classes from
different classloader working together. Use this setting to load classes from
plugin classpath first to make sure classes come from same classloader.
e.g. Spring Boot AutoConfiguration used in plugin only. See
JPA example.
If a resource file (including resource) existed
in app classpath and plugin classpath at the same time, PluginClassLoader
scan all of
them out when performing ClassLoader.loadResources()
. This will potentially cause
unexpected errors, e.g. loading wrong configuration file from the wrong place. Use this
setting making sure resources are only loaded from plugin classpath.