|
此版本仍在开发中,尚未视为稳定版。如需最新稳定版本,请使用 Spring Boot 4.0.4! |
条件评估报告(conditions)
conditions 端点提供有关配置类和自动配置类上条件评估的信息。
正在检索报告
要获取该报告,请向 GET 发起一个 /actuator/conditions 请求,如下列基于 curl 的示例所示:
$ 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: 2249
{
"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 'com.fasterxml.jackson.dataformat.xml.XmlMapper'"
} ],
"matched" : [ ]
},
"Jackson2HttpMessageConvertersConfiguration.MappingJackson2HttpMessageConverterConfiguration" : {
"notMatched" : [ {
"condition" : "OnClassCondition",
"message" : "@ConditionalOnClass did not find required class 'com.fasterxml.jackson.databind.ObjectMapper'"
} ],
"matched" : [ ]
}
},
"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" ]
}
}
}
响应结构
响应包含应用程序条件评估的详细信息。 下表描述了响应的结构:
| 路径 | 类型 | <description> </description> |
|---|---|---|
|
|
按 ID 键索引的应用程序上下文。 |
|
|
满足条件的类和方法。 |
|
|
条件的名称。 |
|
|
条件匹配的原因详情。 |
|
|
未匹配条件的类和方法。 |
|
|
匹配的条件。 |
|
|
条件的名称。 |
|
|
条件未匹配的原因详情。 |
|
|
匹配的条件。 |
|
|
条件的名称。 |
|
|
条件匹配的原因详情。 |
|
|
如有,无条件自动配置类的名称。 |
|
|
父应用上下文的 ID(如果有的话)。 |