Updating the API application

The Journaler API application hasn't been updated to be part of the distributed configuration system, yet. We will reconfigure it now! It doesn't require too much work to achieve this. The first thing we will do is update our dependencies. Open the build.gradle configuration and make sure your dependencies are as follows:

... 
dependencies { 
    ... 
    compile 'org.springframework.cloud:spring-cloud-starter-config' 
    compile 'org.springframework.cloud:spring-cloud-starter-eureka' 
    ... 
} 
 
dependencyManagement { 
    imports { 
        mavenBom "org.springframework.cloud:spring-cloud-netflix:1.4.1.BUILD-SNAPSHOT" 
    } 
} 

When the dependencies are satisfied, we can update our Application class. Open the ApiApplication class and modify it by ...

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.