Client Dependencies

See below for information about the dependencies required for client applications using Spring Cloud Services service instances.

Include Spring Cloud Services Dependencies

Important: Ensure that the ordering of the Maven BOM dependencies listed below is preserved in your application’s build file. Dependency resolution is affected in both Maven and Gradle by the order in which dependencies are declared.

To work with Spring Cloud Services service instances, your client application must include the spring-cloud-services-dependencies and spring-cloud-dependencies BOMs. Unless you are using the spring-boot-starter-parent or Spring Boot Gradle plugin, you must also specify the spring-boot-dependencies BOM as a dependency. See below for compatible Spring Boot and Spring Cloud versions to use with a given Spring Cloud Services release.

Spring Cloud Services Spring Boot Spring Cloud
1.0.x 1.2.x Angel.x
1.1.x 1.3.x–1.4.x Brixton.x
1.2.x 1.3.x–1.4.x Brixton.x
1.3.x 1.3.x–1.4.x Camden.x
1.4.x * 1.5.x Dalston.x

Important: Spring Cloud Services is affected by an issue in Spring Boot version 1.5.3 and is not compatible with that version. To be compatible with Spring Cloud Services 1.4.0, client applications should use Spring Boot versions 1.5.0–1.5.2 or 1.5.4 and later.

Note: An application using Spring Cloud Services 1.3.x dependencies only requires an update to 1.4.x dependencies if using the Config Server support for HashiCorp Vault.

If using Maven, include in pom.xml:

  <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.5.2.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
  </parent>

  <dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>io.pivotal.spring.cloud</groupId>
            <artifactId>spring-cloud-services-dependencies</artifactId>
            <version>1.5.0.RELEASE</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>Dalston.SR1</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
  </dependencyManagement>

If not using the spring-boot-starter-parent, include in the <dependencyManagement> block of pom.xml:

  <dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-dependencies</artifactId>
            <version>1.5.2.RELEASE</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>

        <!-- ... -->

    </dependencies>
  </dependencyManagement>

If using Gradle, you will also need to use the Gradle dependency management plugin.

Include in build.gradle:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("io.spring.gradle:dependency-management-plugin:1.0.2.RELEASE")
        classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.2.RELEASE")
    }
}

apply plugin: "java"
apply plugin: "org.springframework.boot"
apply plugin: "io.spring.dependency-management"

dependencyManagement {
    imports {
        mavenBom "org.springframework.cloud:spring-cloud-dependencies:Dalston.SR1"
        mavenBom "io.pivotal.spring.cloud:spring-cloud-services-dependencies:1.5.0.RELEASE"
    }
}

repositories {
    maven {
        url "https://repo.spring.io/plugins-release"
    }
}

If not using the Spring Boot Gradle plugin, include in the dependencyManagement block of build.gradle:

dependencyManagement {
    imports {
        mavenBom "org.springframework.boot:spring-boot-dependencies:1.5.2.RELEASE"
    }
}

Config Server

Your application must declare spring-cloud-services-starter-config-client as a dependency.

If using Maven, include in pom.xml:

  <dependencies>
    <dependency>
      <groupId>io.pivotal.spring.cloud</groupId>
      <artifactId>spring-cloud-services-starter-config-client</artifactId>
    </dependency>
  </dependencies>

If using Gradle, include in build.gradle:

dependencies {
    compile("io.pivotal.spring.cloud:spring-cloud-services-starter-config-client")
}

Service Registry

Your application must declare spring-cloud-services-starter-service-registry as a dependency.

If using Maven, include in `pom.xml:

  <dependencies>
    <dependency>
      <groupId>io.pivotal.spring.cloud</groupId>
      <artifactId>spring-cloud-services-starter-service-registry</artifactId>
    </dependency>
  </dependencies>

If using Gradle, include in build.gradle:

dependencies {
    compile("io.pivotal.spring.cloud:spring-cloud-services-starter-service-registry")
}

Circuit Breaker Dashboard

Your application must declare spring-cloud-services-starter-circuit-breaker as a dependency.

If using Maven, include in pom.xml:

  <dependencies>
    <dependency>
      <groupId>io.pivotal.spring.cloud</groupId>
      <artifactId>spring-cloud-services-starter-circuit-breaker</artifactId>
    </dependency>
  </dependencies>

If using Gradle, include in build.gradle:

dependencies {
    compile("io.pivotal.spring.cloud:spring-cloud-services-starter-circuit-breaker")
}

Dependency Versioning

A release of the Spring Cloud Services client dependencies follows a release of the underlying open-source Spring Cloud components, which are based on particular releases of Spring Boot. For more information about the basis of Spring Cloud or Spring Cloud Services library releases, see below.

Spring Cloud OSS Releases

Each Spring Cloud major release is named after a London Underground station (as in “Spring Cloud Camden.RELEASE”). Minor releases are known as service releases and are designated SR[n] (as in “Spring Cloud Camden.SR7”), where [n] is the minor release number.

A given major release of Spring Cloud supports the current Spring Boot minor release and one Spring Boot minor release following. When a new Spring Boot major release is published, it will be supported only in the next major release of Spring Cloud. (The Spring Boot 2.0 release follows the Spring Boot 1.5 release; there was no 1.6 release.)

Spring Cloud Release Supported Spring Boot Release
Camden 1.4–1.5
Dalston 1.5
Edgware 1.5
Finchley 2.0

Spring Cloud Services Client Releases

The Spring Cloud Services connectors, as well as the starters dependencies that include the connectors, are versioned and released independently of the Spring Cloud Services tile. The connectors and starters are based on the open-source Spring Cloud client libraries for Config Server, Netflix Eureka, and Netflix Hystrix, and have a new release to follow each Spring Cloud release that affects these components.

A given minor release of the Spring Cloud Services starters uses a particular release of Spring Cloud.

Spring Cloud Services Starters Release Underlying Spring Cloud Release
1.2.0 Brixton.SR6
1.3.0 Camden.SR2
1.4.0 Camden.SR3
1.5.0 Dalston.SR1

Spring Cloud Services Tile Releases

The Spring Cloud Services tile is versioned and released independently of the Spring Cloud Services connectors and starters. The tile contains the server-side components from Spring Cloud for Config Server, Netflix Eureka, Netflix Hystrix, and Netflix Hystrix Dashboard, and typically has a new release following each Spring Cloud service release that affects these components.

A given minor release of the tile includes server-side components from a particular release of Spring Cloud, typically the last stable release.

Spring Cloud Services Tile Release Underlying Spring Cloud Release
1.1.x Brixton
1.2.x Brixton
1.3.x Camden
1.4.x Dalston
Create a pull request or raise an issue on the source for this page in GitHub