Skip to content

DongJu-Na/spring-cloud-sample

Repository files navigation

spring-cloud-sample Java Spring Gradle😎

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.

Config Git Here GitHub

Project Structure

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.

Prerequisites

Make sure you have the following prerequisites installed:

  • Java 17
  • Gradle
  • Lombok plugin for your IDE (for annotation processing)

Getting Started

To build and run the project, follow these steps:

  1. Clone the repository:

    git clone https://github.com/your-username/spring-cloud-sample.git
    cd spring-cloud-sample
  2. Build the project:

    ./gradlew build
  3. Run the Eureka Server:

    ./gradlew :eureka-server:bootRun
  4. Run the Config Server:

    ./gradlew :config-server:bootRun
  5. Run the Gateway Server:

    ./gradlew :gateway-server:bootRun
  6. Run the Dummy API:

    ./gradlew :dummy-api:bootRun

Now, you have the extended microservices architecture up and running locally.

Project Dependencies

  • 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.

Additional Information

  • 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! 🚀