Spring MSA architecture Sample Project
Welcome to the Spring Cloud Microservices Project! This project is designed to demonstrate the implementation of microservices architecture using Spring Cloud in a multi-module Gradle project. The project is structured to include Eureka Server, Config Server, and Gateway Server.
The project is organized into the following modules:
- eureka-server: Eureka Server module responsible for service registration and discovery.
- config-server: Config Server module handling externalized configuration for microservices.
- gateway-server: Gateway Server module serving as the entry point for all microservices.
- dummy-api-server: This is a dummy API server for testing.
Make sure you have the following prerequisites installed:
- Java 17
- Gradle
- Lombok plugin for your IDE (for annotation processing)
To build and run the project, follow these steps:
-
Clone the repository:
git clone https://github.com/your-username/spring-cloud-sample.git cd spring-cloud-sample
-
Build the project:
./gradlew build
-
Run the Eureka Server:
./gradlew :eureka-server:bootRun
-
Run the Config Server:
./gradlew :config-server:bootRun
-
Run the Gateway Server:
./gradlew :gateway-server:bootRun
-
Run the Dummy API:
./gradlew :dummy-api:bootRun
Now, you have the extended microservices architecture up and running locally.
- Spring Boot: Rapid application development platform for building stand-alone, production-grade Spring-based applications.
- Spring Cloud: Set of tools for building and orchestrating microservices.
- Lombok: Library simplifying Java code and eliminating boilerplate code for better readability.
- For detailed documentation and guides, refer to the Spring Cloud Documentation.
- Explore each module's
build.gradle
file for specific dependencies and configurations.
Feel free to contribute, report issues, or provide feedback. Happy coding! 🚀