Skip to Content
Mastering Spring Cloud
book

Mastering Spring Cloud

by Piotr Mińkowski
April 2018
Intermediate to advanced content levelIntermediate to advanced
432 pages
10h 38m
English
Packt Publishing
Content preview from Mastering Spring Cloud

Config Server discovery

To access that example on GitHub, you need to switch to the config_with_discovery branch. Here's the link:

https://github.com/piomin/sample-spring-cloud-netflix/tree/config_with_discovery.

The first change is related to the sample-service-discovery module. We don’t need the spring-cloud-starter-config dependency there. The simple configuration is not fetched from remote property sources, but set in bootstrap.yml. In contrast to the previous example, we launch a single standalone Eureka instance in order to simplify the exercise:

spring:  application:   name: discovery-service server:  port: ${PORT:8761} eureka: client:   registerWithEureka: false   fetchRegistry: false

By contrast, we should include the spring-cloud-starter-eureka ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microservices with Spring Boot and Spring Cloud - Second Edition

Microservices with Spring Boot and Spring Cloud - Second Edition

Magnus Larsson

Publisher Resources

ISBN: 9781788475433Supplemental Content