A modern REST API example built with Quarkus, Jimmer ORM, and quarkus-jimmer-extension in Kotlin.
- Quarkus 3.37.0 with virtual threads
- Jimmer ORM 0.10.12 with KSP code generation
- Kotlin 2.4.0
- PostgreSQL with Liquibase migrations
- GraalVM native image support
- Testcontainers for integration tests
quarkus-jimmer-example-model/ # Entities, DTOs, repositories
src/main/kotlin/.../entity/ # Jimmer @Entity interfaces
src/main/kotlin/.../repository/ # KRepository interfaces
src/main/dto/ # Jimmer DTO definitions (.dto files)
quarkus-jimmer-example-service/ # REST API, services, config
src/main/kotlin/.../resource/ # JAX-RS resources
src/main/kotlin/.../service/ # Service layer with transactions
src/main/resources/ # Application config, Liquibase changelogs
src/test/ # Integration tests with Testcontainers
- Java 25+
- Docker (for PostgreSQL)
docker run -d --name postgres -p 5432:5432 \
-e POSTGRES_DB=quarkus_jimmer \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
postgres:18.4-alpine./gradlew quarkusDev./gradlew testThe Dockerfiles are runtime-only: they copy a prebuilt artifact from
quarkus-jimmer-example-service/build/, so build the application first, then the image.
JVM (uber-jar):
./gradlew :quarkus-jimmer-example-service:build \
-Dquarkus.package.jar.type=uber-jar -x test
docker build -f Dockerfile.jvm -t quarkus-jimmer-example:jvm \
quarkus-jimmer-example-service/buildNative executable (GraalVM via Mandrel container):
./gradlew :quarkus-jimmer-example-service:build \
-Dquarkus.native.enabled=true \
-Dquarkus.package.jar.enabled=false \
-Dquarkus.native.container-build=true \
-x test
docker build -f Dockerfile.native -t quarkus-jimmer-example:native \
quarkus-jimmer-example-service/buildThe Build & Push workflow (.github/workflows/native-build.yml) runs manually only
(workflow_dispatch). It builds the JVM or native image, then pushes it to
ghcr.io/<owner>/<repo>. Inputs: image tag, build mode (jvm / native),
and an optional test run for the JVM mode.
| Method | Path | Description |
|---|---|---|
| GET | /hello | Health check |
| GET | /authors | List all authors |
| GET | /authors/{id} | Get author by ID |
| GET | /books | List all books |
| GET | /books/{id} | Get book by ID |
| POST | /books | Create a book |
| PUT | /books/{id} | Update a book |
| DELETE | /books/{id} | Delete a book |