Skip to content

Spring Cloud Introduction#

What Is The Spring Cloud?#

  • Spring Cloud provides tools for developers to quickly build some of the common patterns in distributed systems (e.g. configuration management, service discovery, circuit breakers, intelligent routing, micro-proxy, control bus, one-time tokens, global locks, leadership election, distributed sessions, cluster state). Coordination of distributed systems leads to boiler plate patterns, and using Spring Cloud developers can quickly stand up services and applications that implement those patterns. They will work well in any distributed environment, including the developer’s own laptop, bare metal data centres, and managed platforms such as Cloud Foundry.

Features#

  • Spring Cloud focuses on providing good out of box experience for typical use cases and extensibility mechanism to cover others.
    • Distributed/versioned configuration
    • Service registration and discovery
    • Routing
    • Service-to-service calls
    • Load balancing
    • Circuit Breakers
    • Global locks
    • Leadership election and cluster state
    • Distributed messaging

Getting Started#

  • If you are using an existing Spring Boot app you want to add Spring Cloud to that app, the first step is to determine the version of Spring Cloud you should use. The version you use in your app will depend on the version of Spring Boot you are using.
  • The table below outlines which version of Spring Cloud maps to which version of Spring Boot.
Release Train Boot Version
Dalston 1.5.x
Edgware 1.5.x
Finchley 2.0.x
Greenwich 2.1.x
Hoxton 2.2.x, 2.3.x (Starting with SR5)
2020.0.x aka Ilford 2.4.x, 2.5.x (Starting with 2020.0.3)
2021.0.x aka Jubilee 2.6.x

Spring Cloud Dalston, Edgware, Finchley, and Greenwich have all reached end of life status and are no longer supported.

  • Bug fixes and backwards compatible features are added to each release train via a service release (SR). Once you determine which version of Spring Cloud to use, you should use the latest service release for that release train. You can find the latest service release information on our release notes page.

  • Now that you know which release train to use and the latest service release for that release train you are ready to add the Spring Cloud BOM to your application.

pom.xml
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
<properties>
    <spring.cloud-version>2021.0.0</spring.cloud-version>
</properties>
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>${spring.cloud-version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

Main Projects#

References#