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-healthon/q/health. - Micrometer Metrics via
quarkus-micrometer-registry-prometheuson/q/metrics.
- I had quite a few troubles to get
lombokandmapstructworking together.mapstructwould 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
@Sqlequivalent 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.