Assume I have a Spring Boot Project Structure like below:
Main-Module
|
| +- Module-A
| +- src
| +- java
| +- ApplicationA.java
| +- resources
| +- static
| +- css
| +- js
| +- templates
| +- index.html
| +- pom.xml
|
| +- Module-B
| +- src
| +- java
| +- ApplicationB.java
| +- resources
| +- static
| +- css
| +- js
| +- templates
| +- index.html
| +- pom.xml
|
| +- Module-C
| +- src
| +- java
| +- ApplicationC.java
| +- resources
| +- static
| +- css
| +- js
| +- templates
| +- index.html
| +- pom.xml
|
| +- pom.xml
ApplicationA.java, ApplicationB.java, ApplicationC.java run on different port separately, such like 8080, 8200, 8300.
Also, Module-B has dependency of Module-A.
May I ask how do I deploy this kind of multi-module project, each module has it's own "@SpringBootApplication"?
Will it be deployed into a single jar? After running the jar, all the "@SpringBootApplication" will be started?
I tried to execute maven package command, and I got 3 Jars (3 sub-modules).
Then I don't know how to deploy them, such like deploy to AWS.
Also, there are not much answers found related to this problem.
Perhaps you would need to deploy each applications seperately. You can deploy the applications individually or depending on how you want it.
There are multiple offering from AWS to deploy our java applications here are a few among them.
Here's a offical spring guide for deploying your spring boot application on AWS.