'"templated": false' 对于 Spring Boot Actuator 意味着什么?

问题描述 投票:0回答:1

对于

Spring Boot
3.1.1 - 关于 Actuator,如果在 Web 浏览器中执行
/actuator
端点,则默认显示以下内容:

{
    "_links": {
        "self": {
            "href": "http://localhost:8085/actuator",
            "templated": false
        },
        "health": {
            "href": "http://localhost:8085/actuator/health",
            "templated": false
        },
            "health-path": {
            "href": "http://localhost:8085/actuator/health/{*path}",
            "templated": true
        }
    }
}

观察到每个路径/uri 总是出现

"templated": false
部分。顺便说一句,当其他端点也暴露时,它就会出现

问题

  • "templated": false
    对于 Spring Boot Actuator 意味着什么?

额外问题

  • 这个字段的目的是什么?
  • 该字段在何处以及如何使用/解释?
  • 如何更改为
    true
spring-boot spring-boot-actuator
1个回答
0
投票

示例

{
   "_links":{
      "self":{
         "href":"http://localhost:8080/actuator",
         "templated":false
      },
      "health":{
         "href":"http://localhost:8080/actuator/health",
         "templated":false
      },
      "health-path":{
         "href":"http://localhost:8080/actuator/health/{*path}",
         "templated":true
      }
   }
}

其中

health-path
是模板化的:意思是,您可以指定您想要查看的详细信息。

© www.soinside.com 2019 - 2024. All rights reserved.