【问题标题】:How to disable the Spring Boot 2 Actuator discovery page如何禁用 Spring Boot 2 Actuator 发现页面
【发布时间】:2018-03-24 16:40:41
【问题描述】:

Spring Boot 2.0 Actuator docs 中所述,Spring 会在配置的 Actuator 基本路径中自动生成发现页面。

但是,我在同一基本路径上映射了自己的概览页面。由于 Actuator 端点映射的优先级高于我自己的映射,因此我无法覆盖该映射。

有没有办法通过 Spring Boot 禁用此发现页面的生成?

文档只提到在将管理上下文路径设置为“/”时页面被禁用,但这对我来说不是一个选项(这需要大量的端点重新映射)。

【问题讨论】:

    标签: java spring spring-mvc spring-boot spring-boot-actuator


    【解决方案1】:

    您可以将 management.context-path 更新为其他路径。像这样的

    management.context-path=/someOtherActuatorPath

    您的发现页面现在将位于 /someOtherActuatorPath

    【讨论】:

      猜你喜欢
      • 2016-06-19
      • 2016-05-03
      • 2019-02-08
      • 2018-07-05
      • 1970-01-01
      • 1970-01-01
      • 2016-03-27
      • 2017-02-21
      • 2019-11-02
      相关资源
      最近更新 更多