このエントリは以下のエントリをベースにしています。
This entry is based on the following one written by John Clingan (Senior Principal Product Manager, Red Hat).
https://microprofile.io/2019/04/22/quarkus-microprofile-cheat-sheet/
QuarkusのMicroProfileサポートに関する質問がstackoverflowに投稿されました。これを見たときに、QuarkusのMicroProfileサポートに関する1枚もののチートシートが必要と感じました。
from Quarkus documentation I can read “Quarkus is made of … Hibernate, RESTEasy, Eclipse Microprofile, etc.”. I have an application which uses Thorntail stack so it’s compatible with Eclipse Microprofile. Is the MicroProfile stack compatible with Quarkus’s stack ? Should I change just the dependencies name, leaving the code untouched ? Thanks
Using Microprofile with Quarkus
https://stackoverflow.com/questions/55791227/using-microprofile-with-quarkus
MicroProfileは仕様の集合体です。SmallRyeはMicroProfile仕様を実装するプロジェクトです。
SmallRye
http://smallrye.io/
一般的に言って、各仕様をサポートするSmallRye GitHubレポジトリがあります。 QuarkusはSmallRyeの実装を使ってMicroProfile仕様を実装しています(smallryeがMavenアーティファクト名に含まれているのはこれが理由です)。Quarkusはこのエントリ執筆時点ではまだBetaですので、互換性の問題が残っています。
SmallRye GitHub Repository
https://github.com/smallrye
例として、下表に記載されているMaven GAV(バージョンを除く)を使って以下のコードを実行すれば、指定したMavenの依存関係をプロジェクトのpom.xmlに追加できます。複数並べる場合、各要素をカンマで区切る必要があります。
mvn quarkus:add-extension -Dextensions="io.quarkus:quarkus-smallrye-metrics,io.quarkus:quarkus-smallrye-health"
まとめると以下のようになりました。
MicroProfile仕様 | Quarkusの依存関係 (Maven group:artifact) | Developer Guide |
CDI | io.quarkus:quarkus-arc | https://quarkus.io/guides/cdi-reference |
JAX-RS | io.quarkus:quarkus-resteasy | https://quarkus.io/guides/rest-client-guide |
JSON-P | io.quarkus:quarkus-jsonp | |
JSON-B | io.quarkus:quarkus-jsonb | https://quarkus.io/guides/rest-json-guide |
Config | デフォルトで包含済み | https://quarkus.io/guides/application-configuration-guide |
Rest Client | io.quarkus:quarkus-smallrye-rest-client | https://quarkus.io/guides/rest-client-guide |
Fault Tolerance | io.quarkus:quarkus-smallrye-fault-tolerance | |
Health Check | io.quarkus:quarkus-smallrye-health | https://quarkus.io/guides/health-guide |
Metrics | io.quarkus:quarkus-smallrye-metrics | https://quarkus.io/guides/metrics-guide |
JWT Security | io.quarkus:quarkus-smallrye-jwt | https://quarkus.io/guides/jwt-guide |
OpenAPI | io.quarkus:quarkus-smallrye-openapi | https://quarkus.io/guides/openapi-swaggerui-guide |
OpenTracing | io.quarkus:quarkus-smallrye-opentracing | https://quarkus.io/guides/opentracing-guide |
Reactive Streams Operators | io.quarkus:quarkus-smallrye-reactive-streams-operators | |
Reactive Messaging (Draft) | io.quarkus:quarkus-smallrye-reactive-messaging | https://quarkus.io/guides/kafka-guide |