Skip to content

Urban-Cents is an open-source showcasing microservices-based system designed to streamline fee calculation, billing, and payment tracking for urban services. Built with Java and Spring Boot, this project aims to provide a robust and scalable solution that can be adapted to various urban service domains.

Notifications You must be signed in to change notification settings

jhon0010/urban-cents

Repository files navigation

Urban Cents Microservices Project

This project demonstrates the capabilities of microservices architecture using a multi-module Gradle setup. The project is structured into multiple modules to exhibit different aspects and functionalities of a microservices ecosystem. The initial setup includes payment and common modules, among others, to showcase the application's modular structure and inter-service communication.

Multi-Module Setup with Gradle

Utilizing Gradle's allprojects and subprojects configurations, this project is structured to have a common build and dependency management across all modules while allowing specific configurations for individual modules.

Common Configuration

The allprojects block in the root build.gradle file defines common configurations, repositories, and dependencies that are shared across all modules.

allprojects {
    repositories {
        mavenCentral()
    }
    // ... other common configurations
}

Building and Running

You can use gradle instead of gradlew if you have it installed in your system.

To build the project, navigate to the project root directory and run:

./gradlew build

To run a specific module, navigate to the module directory and run:

./gradlew :moduleName:bootRun

Replace moduleName with the name of the module you wish to run.

To debug it use the following command:

gradle bootRun --debug-jvm

Eureka server and enable service discovery

Start the Eureka server

To start the Eureka server, navigate to the eureka-server directory and run:

./gradlew clean build bootRun

or if you have a gradle installed in your system, you can run the following command:

gradle clean build bootRun

Now you can access to http://localhost:8761/ Eureka service.

Enable service discovery

To enable service discovery, we need to add the following configuration to the application.properties of the service we want to register with the Eureka server.

# eureka server client configuration
eureka.client.register-with-eureka=true
eureka.client.fetch-registry=true
eureka.client.service-url.default-zone=http://localhost:8761/eureka/


spring.config.import=optional:configserver:http://localhost:8761

# Actuator Configuration to expose all endpoints
management.endpoints.web.exposure.include=*

About

Urban-Cents is an open-source showcasing microservices-based system designed to streamline fee calculation, billing, and payment tracking for urban services. Built with Java and Spring Boot, this project aims to provide a robust and scalable solution that can be adapted to various urban service domains.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages