The purpose is to be able to move Swagger etc. out of Xitrum core, to xitrum-swagger plugin etc. This way we can develop/upgrade plugins independently from Xitrum core.
We need to design an entry point to let plugins initialize themselves during Xitrum startup. We may require that a plugin provides an empty constructor. During startup, Xitrum will create an instance of the specified plugin class.
Plugins are included via build.sbt and their classes are specified in config/xitrum.conf file like this:
plugins = [xitrum.Swagger, xitrum.Scalate]
We need to design when to load plugins, so that plugin creators know when their plugins will be loaded, so that they can design their plugins properly.
The purpose is to be able to move Swagger etc. out of Xitrum core, to xitrum-swagger plugin etc. This way we can develop/upgrade plugins independently from Xitrum core.
We need to design an entry point to let plugins initialize themselves during Xitrum startup. We may require that a plugin provides an empty constructor. During startup, Xitrum will create an instance of the specified plugin class.
Plugins are included via build.sbt and their classes are specified in config/xitrum.conf file like this:
We need to design when to load plugins, so that plugin creators know when their plugins will be loaded, so that they can design their plugins properly.