Skip to content

bartoszkwiat/SpringModulith

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒ Moduliths with Spring Boot Tutorial

This project demonstrates a simple implementation of Moduliths using Spring Boot ๐Ÿš€. Moduliths are a way to structure large applications, breaking them down into smaller, more manageable modules. In this tutorial, we'll be creating a simple system with two modules, Customer and Product.

๐Ÿ“‚ Project Structure

The application is divided into the following major components:

  1. ModulithApplication: ๐Ÿ’ป The main entry point of the application.
  2. Customer Module: ๐Ÿ‘ฅ Contains the CustomerController which exposes a REST API endpoint at /customer.
  3. Product Module: ๐Ÿ“ฆ Contains the ProductController which exposes a REST API endpoint at /product.

Each of these components has its own gradle build script (build.gradle) and source code under src/main/java.

The root directory also contains a build.gradle which orchestrates the build process for all modules.

๐Ÿ—๏ธ Building and Running the Application

To build and run the application, you need to have Gradle installed on your machine. Navigate to the root directory of the application and run the following command:

./gradlew build

Once the application has been built successfully, you can start it with the following command:

./gradlew run

๐ŸŒ API Endpoints

The application exposes the following REST API endpoints:

  • /customer: Returns a test string "Test Customer". ๐Ÿงพ You can use this to verify that the CustomerController is working as expected.

  • /product: Returns a test string "Test Product". ๐Ÿงพ You can use this to verify that the ProductController is working as expected.

About

Spring boot Modulith boilerplate

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages