Quarkus MicroProfile Cheat Sheet

このエントリは以下のエントリをベースにしています。
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
CDIio.quarkus:quarkus-archttps://quarkus.io/guides/cdi-reference
JAX-RSio.quarkus:quarkus-resteasyhttps://quarkus.io/guides/rest-client-guide
JSON-Pio.quarkus:quarkus-jsonp
JSON-Bio.quarkus:quarkus-jsonbhttps://quarkus.io/guides/rest-json-guide
Configデフォルトで包含済みhttps://quarkus.io/guides/application-configuration-guide
Rest Clientio.quarkus:quarkus-smallrye-rest-clienthttps://quarkus.io/guides/rest-client-guide
Fault Toleranceio.quarkus:quarkus-smallrye-fault-tolerance
Health Checkio.quarkus:quarkus-smallrye-healthhttps://quarkus.io/guides/health-guide
Metricsio.quarkus:quarkus-smallrye-metricshttps://quarkus.io/guides/metrics-guide
JWT Securityio.quarkus:quarkus-smallrye-jwthttps://quarkus.io/guides/jwt-guide
OpenAPIio.quarkus:quarkus-smallrye-openapihttps://quarkus.io/guides/openapi-swaggerui-guide
OpenTracingio.quarkus:quarkus-smallrye-opentracinghttps://quarkus.io/guides/opentracing-guide
Reactive Streams Operatorsio.quarkus:quarkus-smallrye-reactive-streams-operators
Reactive Messaging (Draft)io.quarkus:quarkus-smallrye-reactive-messaginghttps://quarkus.io/guides/kafka-guide

コメントを残す

以下に詳細を記入するか、アイコンをクリックしてログインしてください。

WordPress.com ロゴ

WordPress.com アカウントを使ってコメントしています。 ログアウト /  変更 )

Facebook の写真

Facebook アカウントを使ってコメントしています。 ログアウト /  変更 )

%s と連携中