Skip to content

gbdsantos/java-ticketing-system

Repository files navigation

Marketplace | Java Ticketing System

Java 25 logo image MongoDB logo imagem do logotipo MySQL PostgreSQL badge image Redis logo Spring Boot logo Spring Data logo

read in the language

🇧🇷 português

About

The Java Ticketing System (Marketplace) is a demo Spring Boot application showcasing a modular monolith architecture with multiple independent datasources. It illustrates Domain-Driven Design (DDD) patterns, repository event handlers, and entity lifecycle listeners to decouple bounded contexts and persistence concerns.

Primary bounded contexts:

  • Registration — customer profiles, addresses, projections (separate MySQL datasource)
  • Catalog — events, tickets, and audit trails (separate MySQL datasource)

🚀 Quick Start

A minimal set of steps to run the project locally using Docker and Gradle.

  1. Start dependent services with Docker Compose:
# Create and up a new Docker environment
docker compose up -d
  1. Build and run the application:
./gradlew bootRun
  1. Open the HAL Explorer: http://localhost:8081/explorer/index.html

  2. Check application health: http://localhost:8081/actuator/health

Prerequisites

  • Java 25 (or Java 22)
  • Docker & Docker Compose
  • Gradle (optional, wrapper included)

Running

With Docker

Docker Compose brings up MySQL instances used by the multiple datasources. Ensure Docker Desktop is running before starting.

docker compose up -d

Locally (without Docker)

Provide local MySQL instances and set datasource connection properties in the appropriate application-profile.yml files or environment variables.

Run the app:

./gradlew bootRun

Configuration

The project uses multiple Spring Data datasources. Datasource URLs, credentials, and ports can be configured via Spring profiles and environment variables. Review src/main/resources for example configuration files.

API Endpoints

Use Postman/Insomnia or any HTTP client to call the exposed REST resources.


Made with ❤️ by Guilherme Bezerra 👋 Get in touch!

About

🎫 The Java Ticketing System (Marketplace) is a Spring Boot application that demonstrates a modular monolithic architecture.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages