执行器不工作

Actuators does not work

我正在尝试在我的 spring 引导应用程序中设置执行器端点,但我无法获得我在 application.yml 中设置的值。这是我目前的配置:

src/main/resources/application.yml

info.app:
  description: mydescription
  name: myname
  version: 1.0

management.contextPath: /rest/internal/application

但是,当我尝试访问端点时,我只得到这个:

rest call to http://localhost:8090/rest/internal/application/info

{
    "Manifest-Version":"1.0",
    "Created-By":"1.6.0_18 (Sun Microsystems Inc.)"
}

那么,我做错了什么?

.app 后缀引起了麻烦,将 info 部分更改为即

info:
  description: mydescription
  name: myname
  version: 1.0

The documentation 指出:

You can customize the data exposed by the info endpoint by setting info.* Spring properties. All Environment properties under the info key will be automatically exposed.

以下是 yaml 中的示例:

info:
  app:
    name: MyService
    description: My awesome service
    version: 1.0.0