我目前正在使用Spring Boot 2运行三个Web服务。它们位于不同的端口号上。但是其中之一具有以下配置:
eureka:
instance:
leaseRenewalIntervalInSeconds: 60
nonSecurePortEnabled: false
securePortEnabled: true
statusPageUrl: 'https://${eureka.instance.hostName}:${server.port}/actuator/info'
healthCheckUrl: 'https://${eureka.instance.hostName}:${server.port}/actuator/health'
homePageUrl: 'https://${eureka.instance.hostName}:${server.port}/'
client:
registryFetchIntervalSeconds: 30
serviceUrl:
defaultZone: ${EUREKA_SERVICE_URL:http://system:****@localhost:8761}/eureka/
management:
endpoints:
web:
exposure:
include: "*"
endpoint:
health:
show-details: ALWAYS
server:
port: 1234
ssl:
key-store: keystore.jks
key-store-password: ******
keyStoreType: JKS
Spring管理员仍然可以检测到Web服务,但是即使我知道它已经启动并运行得很好,它的状态也显示为“ DOWN”。
配置中是否缺少任何内容?
答案 0 :(得分:0)
尝试将其添加到您的配置中,它应该允许您的https微服务注册到Eureka。
eureka:
instance:
nonSecurePortEnabled: false
securePortEnabled: true
statusPageUrl: 'https://${eureka.instance.hostName}:${server.port}/info'
healthCheckUrl:'https://${eureka.instance.hostName}:${server.port}/health'
homePageUrl: 'https://${eureka.instance.hostName}:${server.port}/'