条件評価レポート (conditions)

conditions エンドポイントは、構成および自動構成クラスの条件の評価に関する情報を提供します。

レポートの取得

レポートを取得するには、次の curl ベースの例に示すように、GET リクエストを /actuator/conditions に作成します。

$ curl 'http://localhost:8080/actuator/conditions' -i -X GET

結果のレスポンスは次のようになります。

HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v3+json
Content-Length: 3082

{
  "contexts" : {
    "application" : {
      "negativeMatches" : {
        "GsonHttpMessageConvertersConfiguration" : {
          "notMatched" : [ {
            "condition" : "OnClassCondition",
            "message" : "@ConditionalOnClass did not find required class 'com.google.gson.Gson'"
          } ],
          "matched" : [ ]
        },
        "Jackson2HttpMessageConvertersConfiguration.MappingJackson2XmlHttpMessageConverterConfiguration" : {
          "notMatched" : [ {
            "condition" : "OnClassCondition",
            "message" : "@ConditionalOnClass did not find required class 'tools.jackson.dataformat.xml.XmlMapper'"
          } ],
          "matched" : [ ]
        },
        "Jackson2HttpMessageConvertersConfiguration.MappingJackson2HttpMessageConverterConfiguration" : {
          "notMatched" : [ {
            "condition" : "Jackson2HttpMessageConvertersConfiguration.PreferJackson2OrJacksonUnavailableCondition",
            "message" : "AnyNestedCondition 0 matched 2 did not; NestedCondition on Jackson2HttpMessageConvertersConfiguration.PreferJackson2OrJacksonUnavailableCondition.JacksonUnavailable @ConditionalOnMissingBean (types: org.springframework.http.converter.json.JacksonJsonHttpMessageConverter; SearchStrategy: all) found beans of type 'org.springframework.http.converter.json.JacksonJsonHttpMessageConverter' jacksonJsonHttpMessageConverter; NestedCondition on Jackson2HttpMessageConvertersConfiguration.PreferJackson2OrJacksonUnavailableCondition.Jackson2Preferred @ConditionalOnProperty (spring.http.converters.preferred-json-mapper=jackson2) did not find property 'spring.http.converters.preferred-json-mapper'"
          } ],
          "matched" : [ {
            "condition" : "OnClassCondition",
            "message" : "@ConditionalOnClass found required class 'com.fasterxml.jackson.databind.ObjectMapper'"
          } ]
        }
      },
      "positiveMatches" : {
        "EndpointAutoConfiguration#propertiesEndpointAccessResolver" : [ {
          "condition" : "OnBeanCondition",
          "message" : "@ConditionalOnMissingBean (types: org.springframework.boot.actuate.endpoint.EndpointAccessResolver; SearchStrategy: all) did not find any beans"
        } ],
        "EndpointAutoConfiguration#endpointOperationParameterMapper" : [ {
          "condition" : "OnBeanCondition",
          "message" : "@ConditionalOnMissingBean (types: org.springframework.boot.actuate.endpoint.invoke.ParameterValueMapper; SearchStrategy: all) did not find any beans"
        } ],
        "EndpointAutoConfiguration#endpointCachingOperationInvokerAdvisor" : [ {
          "condition" : "OnBeanCondition",
          "message" : "@ConditionalOnMissingBean (types: org.springframework.boot.actuate.endpoint.invoker.cache.CachingOperationInvokerAdvisor; SearchStrategy: all) did not find any beans"
        } ]
      },
      "unconditionalClasses" : [ "org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration", "org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration" ]
    }
  }
}

レスポンス構造

レスポンスには、アプリケーションの条件評価の詳細が含まれます。次の表に、レスポンスの構造を示します。

パス タイプ 説明

contexts

Object

ID をキーとするアプリケーションコンテキスト。

contexts.*.positiveMatches

Object

一致した条件を持つクラスとメソッド。

contexts.*.positiveMatches.*.[].condition

String

条件の名前。

contexts.*.positiveMatches.*.[].message

String

条件が一致した理由の詳細。

contexts.*.negativeMatches

Object

一致しなかった条件を持つクラスとメソッド。

contexts.*.negativeMatches.*.notMatched

Array

一致した条件。

contexts.*.negativeMatches.*.notMatched.[].condition

String

条件の名前。

contexts.*.negativeMatches.*.notMatched.[].message

String

条件が一致しなかった理由の詳細。

contexts.*.negativeMatches.*.matched

Array

一致した条件。

contexts.*.negativeMatches.*.matched.[].condition

String

条件の名前。

contexts.*.negativeMatches.*.matched.[].message

String

条件が一致した理由の詳細。

contexts.*.unconditionalClasses

Array

無条件の自動構成クラスの名前(ある場合)。

contexts.*.parentId

String

親アプリケーションコンテキストの ID(存在する場合)。