Discovery

The next thing that we are going to do is provide a mechanism for our servers so that they can discover each other. Eureka discovery server will be the solution for this requirement. We will set up the centralized registry for our applications. The flow will be like this: every one of our servers will contact the discovery server instance and register its address. All others will be able to communicate with it thanks to this.

Set up the new Spring Cloud application, similar to what you did for configuring the application. Make sure it is defined like this:

  • The build.gradle file configuration:
buildscript { ext { kotlinVersion = '1.1.60' springBootVersion = '2.0.0.M6' } repositories { mavenCentral() maven { url "https://repo.spring.io/snapshot" ...

Get Building Applications with Spring 5 and Kotlin now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.