【发布时间】:2017-05-11 06:11:20
【问题描述】:
我正在尝试为我的大多数执行器端点使用一个通用前缀。
我知道我可以使用management.context-path 设置一个通用前缀,例如/actuator。在这种情况下,我的http://localhost:8080/actuator 会吐出像
self: {
href: "http://localhost:8080/actuator"
},
info: {
href: "http://localhost:8080/actuator/info"
},
env: {
href: "http://localhost:8080/actuator/env"
},
但是,我想取消/更改其中一个前缀,例如 info,因此链接为 http://localhost:8080/other/info,而所有其他链接保持不变。
我知道我可以通过设置所有 endpoints.*.path 属性来做到这一点,但我不想这样做。我只想做一个改变。如果我选择的端点有两个映射,我也会很高兴。
这可能吗?我在 Boot 1.4.1 上,已经调试了代码,但没有发现任何有用的东西。
【问题讨论】:
标签: spring-boot spring-boot-actuator