Getting started with Spring Cloud
The Spring Cloud family of projects provides integration extensions for Spring Boot of various frameworks, which offer functionality for distributed service discovery, configuration, routing, service invocation, and more. Through the use of uniform API, we can add these concepts to our applications and later have the flexibility to change the specific implementation if such a need arises without making deep-cutting changes to our codebase.
How to do it...
We will start by enhancing our BookPub
project with base Spring Cloud modules by adding them to the main build configuration:
- Add the following content to the
build.gradle
file located at the root of the project:
... apply plugin: 'docker' dependencyManagement { imports { mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Finchley.BUILD-SNAPSHOT' } } jar { baseName = 'bookpub' version = '0.0.1-SNAPSHOT' } ... dependencies { ... compile("org.springframework...