This project demonstrates a simple, event-driven system using Spring Cloud Stream, Kafka, and Spring Boot with GraalVM native images. All services are designed to run within a Docker environment.
- Java 21+
- Docker and Docker Compose
The entire system, including the applications and the end-to-end tests, is managed through Docker Compose.
If you want to build the application faster, you can just pull the necessary images from docker:
docker pull paketobuildpacks/builder-jammy-java-tiny:latest
docker pull paketobuildpacks/run-jammy-tiny:latest1. Build the Application Docker Images
First, build the native Docker images for the source, enricher and sink services using the Spring Boot Gradle plugin.
./gradlew clean bootBuildImage --no-daemonOr you can build one image after another like so:
./gradlew :cashcard-transaction-source:bootBuildImage --no-daemon
./gradlew :cashcard-transaction-enricher:bootBuildImage --no-daemon
./gradlew :cashcard-transaction-sink:bootBuildImage --no-daemon docker compose up -d --buildhttp://localhost:8080/pub
HTTP Method: POST
Example Payload:
{
"id": 1234,
"cashCard": {
"id": 12345,
"owner": "testOwner",
"amountRequestedForAuth": "3.14"
}
}
You can also check requests.http to run the same request.
./gradlew clean test
The system starts with a preconfigured Prometheus datasource and a basic "CashCard System Overview" dashboard.
Username: admin
Password: admin
A screenshot of Grafana Dashboard should look like so:
