java - 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
解决方案
当部署到外部容器时,Spring Boot 不支持在单独的端口上运行管理服务器。如果您希望管理端点在单独的端口上可用,则应使用嵌入式 Web 服务器。
推荐阅读
- c++ - -fsanitize=leak 如何影响运行时性能?
- c# - 用于数据库备份的 SQL 参数化查询被 sonarqube 报告为 sql 注入
- assembly - 用于链接可执行文件的 /3 键后 DOSBOX 崩溃
- db2 - IBM DB2 On Cloud - 超过了 5 个连接的最大限制。拒绝连接
- r - 如何根据每年的事件频率运行线性回归模型
- javascript - export * as bar VS export { 默认为 bar }
- c - C 退出时出现错误
- java - 查看最后一个和第一个片段时如何使后退/下一个按钮不可见
- apache - 重定向301域和一些页面
- javascript - 系统地组合数组