首页 > 解决方案 > Spring Boot 2.2 管理端点不能与外部 Jetty 一起使用

问题描述

从 spring boot 2.0.4 迁移到 Spring boot 2.2.13 后,管理端口与服务器端口不同,管理端点停止工作。看起来不同的管理端口本身没有打开监听。

虽然它在部署为外部码头的战争时不起作用,但在作为嵌入式码头运行时它运行良好。

以下是相关的 yml 部分:

management:
  endpoint:
    health:
      show-details: "ALWAYS"
  endpoints:
    web:
      exposure:
        include: health
      base-path: /manage
    enabled-by-default: true
  server:
    port: 7080

标签: javaspringspring-bootjettyspring-actuator

解决方案


当部署到外部容器时,Spring Boot 不支持在单独的端口上运行管理服务器。如果您希望管理端点在单独的端口上可用,则应使用嵌入式 Web 服务器。


推荐阅读