Search code examples
springspring-bootspring-cloudspring-cloud-netflix

How does the eureka client find the eureka server in spring boot 1.5.2?


I'm going through this tutorial and I don't see any configuration for the location / url of the eureka server (Only the src/main/resources/bootstrap.properties containing the name of the eureka client), so how does this client know where the Eureka server is?


Solution

  • Because it is using default eureka server address http://127.0.0.1:8761/eureka. If you don't specify any property like below, eureka client will try to connect http://127.0.0.1:8761/eureka and eureka server is running on 8761 port as default.

    eureka:
      client:
        service-url:
          defaultZone: http://127.0.0.1:8761/eureka