I want to implement the plugin architecture in a Spring Boot application. Let me explain my scenario. I have a main application that starts the server, manages security, etc. The application is similar to the root of my final product, which will include this root application and other plugins added to it.
Now plugins are a Spring Boot application that I can add to the root application, dynamically search for banks in a specific path or add them depending on the project as a library.
Plugins have their own configurations and are similar to applications running inside the main root application. Say, if the root application starts the server, the plugin application can have all the controllers (endpoints), beans, etc. that provide functionality to my product.
This is a premise, now I want to know
- How can I achieve this architecture?
- How will the root application interact with plugins?
- Will they have separate application contexts?
- How to download and configure a child application from the root application?
- When an application receives a request from clients, how can I redirect a request to a specific controller inside a specific plugin, given that I can have many plugins.
I am confused by this concept and how it can work. Any help is appreciated. If there is an example that anyone can provide, it will be just great.
source share