环境 (env)
原文:https://docs.spring.io/spring-boot/api/rest/actuator/env.html
env 端点暴露 Spring Environment 中的属性。
检索环境属性
向 /actuator/env 发出 GET 请求:
$ curl 'http://localhost:8080/actuator/env' -i -X GET
响应包含:
activeProfiles:活动 profile。defaultProfiles:默认 profile。propertySources:属性源列表,每个包含 name 和 properties(值及来源)。
检索单个属性
向 /actuator/env/{name} 发出 GET 请求可检索特定属性的值及其来源信息。
敏感属性值默认被清理,可通过配置 management.endpoint.env.show-values 控制是否显示。