0% found this document useful (0 votes)
15 views6 pages

Overview of Spring Boot Multi-Module Projects

A Multi-Module Project is a structure that divides an application into multiple independent modules, each serving a specific function. It offers advantages such as simplified builds, flexible deployment, and code reusability, while also supporting microservices architecture. The parent module acts as a container for sub-modules, managing dependencies and build order through a central pom.xml file.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views6 pages

Overview of Spring Boot Multi-Module Projects

A Multi-Module Project is a structure that divides an application into multiple independent modules, each serving a specific function. It offers advantages such as simplified builds, flexible deployment, and code reusability, while also supporting microservices architecture. The parent module acts as a container for sub-modules, managing dependencies and build order through a central pom.xml file.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Spring Boot Multi Module Project

An Overview
What is a Multi Module Project
• Multi-Module Project is just a set of multiple projects where each project has its own
respective function.

• In a Multi-Module Project, an application is divided into multiple modules, where each


module plays an important role in the certain functionality of an application.

• A module can be considered as an independent project or sub-project.


Advantages of a Multi-Module Project
• It provides a great ability to build all sub-modules only with a single command.

• We can run the build command from the parent module.

• While building the application, the build system takes care of the build order.

• Deployment of the applications gets very convenient and flexible.

• Also, the code from the various modules across different projects can be re-used.

• We can gain benefits from the microservices architecture.


Working of the Multi-Module Project
Working of the Multi-Module Project
• Firstly you have to create a Parent module.
• The parent module acts as a container of sub-modules.
• Also, you can use the Parent module for bootstrapping of the application ( main() method ).
• Alternatively, you can also use any of the sub-module by implementing the main() method for
bootstrapping the application and deleting the main() method from the parent module.
• Your Parent module should have ‘pom’ packaging instead of jar and war.
• When you create sub-modules, all of them get listed in the ‘<modules>’ tag in [Link] of the
parent module.
• All the dependencies you have enlisted in the [Link] of the parent module will be
automatically inherited by sub-modules directly.
• Therefore, you don’t need to add dependencies to sub-module’s [Link] to use them.
THANK YOU

You might also like