在您可以使用相同的动态端口Spring boot 2.3.8-RELEASE
公开管理执行器HTTP
和服务器。HTTPS
当我升级到Spring boot 2.5.3
时,管理执行器暴露在上面HTTPS
。Consul 健康检查失败,因为它使用HTTP
而不是HTTPS
在主服务器和管理的同一动态端口上。
那么Spring boot 2.5.3
,如何配置管理执行器端点以使用HTTP
并具有与服务器相同的动态端口?
有什么帮助或想法吗?
此配置禁用执行器端点 HTTP 或 HTTPS
server:
port: 0 # dynamic port
ssl.key-store: classpath:keystore.p12
truststore:
location: classpath:truststore.jks
management:
ssl.enable: false
endpoints:
web:
exposure:
include: health,info,env,configprops
endpoint:
health:
show-details: always
此配置通过 HTTPS 而不是 HTTP 启用执行器
server:
port: 0 # dynamic port
ssl.key-store: classpath:keystore.p12
truststore:
location: classpath:truststore.jks
management:
server.ssl.enabled: false # actuator still exposed over HTTPs
endpoints:
web:
exposure:
include: health,info,env,configprops
endpoint:
health:
show-details: always