【问题标题】:Setting management.endpoints.web.base-path to root when server.servlet.context-path is set设置 server.servlet.context-path 时将 management.endpoints.web.base-path 设置为 root
【发布时间】:2019-09-30 22:56:42
【问题描述】:

我正在尝试将执行器的基本路径设置为 / 以便 PCF 可以访问它。

我正在使用 SpringBoot 2.1.4

所有应用程序都已配置上下文根。设置 management.endpoints.web.base-path 仅更改相对于应用程序上下文根的路径。

当有应用程序上下文根时,有没有办法将管理路径设置为根?或者有什么方法可以破解 SB2,以便所有对路径的请求都会路由到我的所有 RequestMappings?

【问题讨论】:

    标签: spring-boot cloud-foundry spring-boot-actuator actuator


    【解决方案1】:

    如果“以便 PCF 可以访问它”,您的意思是 Pivotal Apps Manager,并且您在应用中使用上下文路径,那么您需要申请 this workaround。

    这将允许您在应用中使用上下文路径,但仍会公开执行器端点,以便 Pivotal Apps Manager 可以使用它们。

    希望有帮助!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-05-14
      • 1970-01-01
      • 2020-06-25
      • 2013-10-21
      • 2015-07-29
      • 2012-03-13
      • 2014-12-21
      • 1970-01-01
      相关资源
      最近更新 更多