Evaluating Quarkus 1.12.2 as an alternative to Spring Boot.
- Endpoints with JAX RS via
quarkus-resteasy
&quarkus-resteasy-jackson
. - Persistence with Panache using quarkus-hibernate-orm-panache.
A Postgres container to run the app locally is provided via
docker-compose.yml
. - Persistence for unit tests with testcontainers. No manual startup of a postgres container necessary for tests.
- Flyway migrations via `quarkus-flyway.
- OpenApi / SwaggerUI via
quarkus-smallrye-openapi
. - Hibernate Validator via
quarkus-hibernate-validator
. - Health Check including live/ready via
quarkus-smallrye-health
on/q/health
. - Micrometer Metrics via
quarkus-micrometer-registry-prometheus
on/q/metrics
.
- I had quite a few troubles to get
lombok
andmapstruct
working together.mapstruct
would not see the builders of my value objects reliably. Only the solution with annotation processors was working reliably in the end. Not sure though if this is caused by Quarkus or the newest versions of the library itself. - There is no
@Sql
equivalent to execute DB scripts before and after tests. There is an extension based upon flyway though (https://github.com/radcortez/flyway-junit5-extensions). For now I did a quick and dirty flyway migration manually before every test method.
You can run your application in dev mode that enables live coding using
./mvnw compile quarkus:dev
or make run
.
- It seems like mapstruct cannot handle all changes in dev mode (probably because annotation processors do not run on reload).
make native-build
to build a docker image with native executable.
make native-run
to run it. Though, the current config will only run on Macs.