2.5. RegistryStatsResource を使用した RESTEasy エンドポイントの表示

RegistryStatsResource リソースからアプリケーションの RESTEasy エンドポイントについての情報を取得できます。

手順

  1. アプリケーションのデプロイメント記述子 web.xml ファイルに以下の XML スニペットを追加して、RegistryStatsResource を登録します。

    <context-param>
        <param-name>resteasy.resources</param-name>
        <param-value>org.jboss.resteasy.plugins.stats.RegistryStatsResource</param-value>
    </context-param>
  2. アプリケーションの RESTEasy エンドポイントを表示します。

    • CLI の使用

      • XML で結果を取得する

        $ curl http://localhost:8080/{APPLICATION_PREFIX_URL}/resteasy/registry
      • JSON で結果を取得する

        $ curl http://localhost:8080/{APPLICATION_PREFIX_URL}/resteasy/registry -H "Accept: application/json"
    • Web ブラウザーの使用

      http://localhost:8080/{APPLICATION_PREFIX_URL}/resteasy/registry