I want to implement plugin architecture in Spring Boot application. Let me explain my scenario. I have a main application, which starts the server, manages security, etc. The app is like the root of my final product which will include this root app and other plugins added to it.
Now, the plugins are Spring Boot application themselves, which I may add to the root app by dynamically searching for jars in the specific path or by added them to project dependency as library.
Plugins have their own configurations and are like apps running inside the main root app. Let's say if the root app runs the server, the plugin app may have all the controllers (endpoints), beans etc that provide functionality to my product.
This is the premise, now what I want to know is,
I am confused about the concept here, and how it can work. Any sort of help is appreciated. If there is some example that anyone can provide, that will be just wonderful.
This post was 3 years ago. However, I'd like to answer this for someone who looking for a solution for a similar scenario. It seems that pf4j which is a plugin framework that is suitable for you. Beside supporting native app, it also has spring-pf4j, so you can use it into spring.
URL: https://pf4j.org