2017-06-20 37 views
0

我以前在HTTP(非SSL)中多次使用過Eureka。 但是,我正嘗試在獨立模式下配置Eureka服務器。 不幸的是,服務器似乎無法註冊。如何在獨立HTTPS中配置Spring Cloud Eureka

客戶端應用程序能夠無問題地註冊。

服務器嘗試連接到http來代替https

(使用org.springframework.cloud:spring-cloud-starter-parent:Dalston.SR1)

這裏是我的尤里卡服務器配置:


server: 
    port: 8761 
    transport: https 
    name: localhost 

eureka: 
    instance: 
    nonSecurePortEnabled: false 
    securePortEnabled: true 
    securePort: ${server.port} 
    hostname: localhost 
    client: 
    registerWithEureka: false 
    fetchRegistry: false 
    serviceUrl: 
     defaultZone: https://${eureka.instance.hostname}:${eureka.instance.securePort}/eureka/ 
    server: 
    waitTimeInMsWhenSyncEmpty: 5 

回答

0

發現問題。 主要問題是我的application.yml位於錯誤的目錄中。

該目錄是名稱資源而不是資源

重命名目錄後,我的問題似乎解決了。

相關問題