プロパティの構成 (configprops)

configprops エンドポイントは、アプリケーションの @ConfigurationProperties Bean に関する情報を提供します。

すべての @ConfigurationProperties Bean の取得

すべての @ConfigurationProperties Bean を取得するには、次のカールベースの例に示すように、/actuator/configprops に対して GET リクエストを作成します。

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

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

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

{
  "contexts" : {
    "application" : {
      "beans" : {
        "spring.web-org.springframework.boot.autoconfigure.web.WebProperties" : {
          "inputs" : {
            "error" : {
              "includeBindingErrors" : { },
              "includeException" : { },
              "includeMessage" : { },
              "includePath" : { },
              "includeStacktrace" : { },
              "path" : { },
              "whitelabel" : {
                "enabled" : { }
              }
            },
            "localeResolver" : { },
            "resources" : {
              "addMappings" : { },
              "cache" : {
                "cachecontrol" : { },
                "useLastModified" : { }
              },
              "chain" : {
                "cache" : { },
                "compressed" : { },
                "strategy" : {
                  "content" : {
                    "enabled" : { },
                    "paths" : [ { } ]
                  },
                  "fixed" : {
                    "enabled" : { },
                    "paths" : [ { } ]
                  }
                }
              },
              "staticLocations" : [ { }, { }, { }, { } ]
            }
          },
          "prefix" : "spring.web",
          "properties" : {
            "error" : {
              "includeBindingErrors" : "NEVER",
              "includeException" : false,
              "includeMessage" : "NEVER",
              "includePath" : "ALWAYS",
              "includeStacktrace" : "NEVER",
              "path" : "/error",
              "whitelabel" : {
                "enabled" : true
              }
            },
            "localeResolver" : "ACCEPT_HEADER",
            "resources" : {
              "addMappings" : true,
              "cache" : {
                "cachecontrol" : { },
                "useLastModified" : true
              },
              "chain" : {
                "cache" : true,
                "compressed" : false,
                "strategy" : {
                  "content" : {
                    "enabled" : false,
                    "paths" : [ "/**" ]
                  },
                  "fixed" : {
                    "enabled" : false,
                    "paths" : [ "/**" ]
                  }
                }
              },
              "staticLocations" : [ "classpath:/META-INF/resources/", "classpath:/resources/", "classpath:/static/", "classpath:/public/" ]
            }
          }
        },
        "spring.jackson-org.springframework.boot.jackson.autoconfigure.JacksonProperties" : {
          "inputs" : {
            "findAndAddModules" : { },
            "serialization" : { },
            "factory" : {
              "constraints" : {
                "read" : {
                  "maxDocumentLength" : { },
                  "maxNameLength" : { },
                  "maxNestingDepth" : { },
                  "maxNumberLength" : { },
                  "maxStringLength" : { },
                  "maxTokenCount" : { }
                },
                "write" : {
                  "maxNestingDepth" : { }
                }
              }
            },
            "read" : { },
            "visibility" : { },
            "constructorDetector" : { },
            "datatype" : {
              "datetime" : { },
              "enum" : { },
              "jsonNode" : { }
            },
            "deserialization" : { },
            "json" : {
              "read" : { },
              "write" : { }
            },
            "mapper" : { },
            "write" : { },
            "useJackson2Defaults" : { }
          },
          "prefix" : "spring.jackson",
          "properties" : {
            "findAndAddModules" : true,
            "serialization" : { },
            "factory" : {
              "constraints" : {
                "read" : {
                  "maxDocumentLength" : -1,
                  "maxNameLength" : 50000,
                  "maxNestingDepth" : 500,
                  "maxNumberLength" : 1000,
                  "maxStringLength" : 100000000,
                  "maxTokenCount" : -1
                },
                "write" : {
                  "maxNestingDepth" : 500
                }
              }
            },
            "read" : { },
            "visibility" : { },
            "constructorDetector" : "DEFAULT",
            "datatype" : {
              "datetime" : { },
              "enum" : { },
              "jsonNode" : { }
            },
            "deserialization" : { },
            "json" : {
              "read" : { },
              "write" : { }
            },
            "mapper" : { },
            "write" : { },
            "useJackson2Defaults" : false
          }
        },
        "spring.mvc-org.springframework.boot.webmvc.autoconfigure.WebMvcProperties" : {
          "inputs" : {
            "contentnegotiation" : {
              "defaultContentTypes" : [ ],
              "favorParameter" : { },
              "mediaTypes" : { }
            },
            "servlet" : {
              "loadOnStartup" : { },
              "path" : { }
            },
            "format" : { },
            "staticPathPattern" : { },
            "apiversion" : {
              "use" : {
                "mediaTypeParameter" : { }
              }
            },
            "dispatchOptionsRequest" : { },
            "dispatchTraceRequest" : { },
            "problemdetails" : {
              "enabled" : { }
            },
            "logResolvedException" : { },
            "async" : { },
            "webjarsPathPattern" : { },
            "view" : { },
            "publishRequestHandledEvents" : { },
            "logRequestDetails" : { },
            "pathmatch" : {
              "matchingStrategy" : { }
            }
          },
          "prefix" : "spring.mvc",
          "properties" : {
            "contentnegotiation" : {
              "defaultContentTypes" : [ ],
              "favorParameter" : false,
              "mediaTypes" : { }
            },
            "servlet" : {
              "loadOnStartup" : -1,
              "path" : "/"
            },
            "format" : { },
            "staticPathPattern" : "/**",
            "apiversion" : {
              "use" : {
                "mediaTypeParameter" : { }
              }
            },
            "dispatchOptionsRequest" : true,
            "dispatchTraceRequest" : false,
            "problemdetails" : {
              "enabled" : false
            },
            "logResolvedException" : false,
            "async" : { },
            "webjarsPathPattern" : "/webjars/**",
            "view" : { },
            "publishRequestHandledEvents" : true,
            "logRequestDetails" : false,
            "pathmatch" : {
              "matchingStrategy" : "PATH_PATTERN_PARSER"
            }
          }
        }
      }
    }
  }
}

レスポンス構造

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

パス タイプ 説明

contexts

Object

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

contexts.*.beans.*

Object

@ConfigurationProperties beans keyed by bean name.

contexts.*.beans.*.prefix

String

Bean のプロパティの名前に適用されるプレフィックス。

contexts.*.beans.*.properties

Object

名前と値のペアとしての Bean のプロパティ。

contexts.*.beans.*.inputs

Object

この Bean にバインドするときに使用される構成プロパティの起源と値。

contexts.*.parentId

String

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

プレフィックスによる @ConfigurationProperties Bean の取得

特定のプレフィックスにマップされた @ConfigurationProperties Bean を取得するには、次の curl ベースの例に示すように、GET リクエストを /actuator/configprops/{prefix} に送信します。

$ curl 'http://localhost:8080/actuator/configprops/spring.jackson' -i -X GET

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

HTTP/1.1 200 OK
Content-Disposition: inline;filename=f.txt
Content-Type: application/vnd.spring-boot.actuator.v3+json
Content-Length: 2332

{
  "contexts" : {
    "application" : {
      "beans" : {
        "spring.jackson-org.springframework.boot.jackson.autoconfigure.JacksonProperties" : {
          "inputs" : {
            "findAndAddModules" : { },
            "serialization" : { },
            "factory" : {
              "constraints" : {
                "read" : {
                  "maxDocumentLength" : { },
                  "maxNameLength" : { },
                  "maxNestingDepth" : { },
                  "maxNumberLength" : { },
                  "maxStringLength" : { },
                  "maxTokenCount" : { }
                },
                "write" : {
                  "maxNestingDepth" : { }
                }
              }
            },
            "read" : { },
            "visibility" : { },
            "constructorDetector" : { },
            "datatype" : {
              "datetime" : { },
              "enum" : { },
              "jsonNode" : { }
            },
            "deserialization" : { },
            "json" : {
              "read" : { },
              "write" : { }
            },
            "mapper" : { },
            "write" : { },
            "useJackson2Defaults" : { }
          },
          "prefix" : "spring.jackson",
          "properties" : {
            "findAndAddModules" : true,
            "serialization" : { },
            "factory" : {
              "constraints" : {
                "read" : {
                  "maxDocumentLength" : -1,
                  "maxNameLength" : 50000,
                  "maxNestingDepth" : 500,
                  "maxNumberLength" : 1000,
                  "maxStringLength" : 100000000,
                  "maxTokenCount" : -1
                },
                "write" : {
                  "maxNestingDepth" : 500
                }
              }
            },
            "read" : { },
            "visibility" : { },
            "constructorDetector" : "DEFAULT",
            "datatype" : {
              "datetime" : { },
              "enum" : { },
              "jsonNode" : { }
            },
            "deserialization" : { },
            "json" : {
              "read" : { },
              "write" : { }
            },
            "mapper" : { },
            "write" : { },
            "useJackson2Defaults" : false
          }
        }
      }
    }
  }
}
{prefix} は正確である必要はありません。より一般的なプレフィックスは、そのプレフィックスステムにマップされたすべての Bean を返します。

レスポンス構造

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

パス タイプ 説明

contexts

Object

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

contexts.*.beans.*

Object

@ConfigurationProperties beans keyed by bean name.

contexts.*.beans.*.prefix

String

Bean のプロパティの名前に適用されるプレフィックス。

contexts.*.beans.*.properties

Object

名前と値のペアとしての Bean のプロパティ。

contexts.*.beans.*.inputs

Object

この Bean にバインドするときに使用される構成プロパティの起源と値。

contexts.*.parentId

String

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