spring cloud

什麼是Spring Cloud

  Spring Cloud是一系列框架的有序集合。它利用Spring Boot的開發便利性巧妙地簡化了分佈式系統基礎設施的開發,例如:配置管理、服務發現、斷路器、智能路由、微代理、控制總線、一次性令牌、全局鎖、領導選擇、分佈式會話、羣集狀態、數據監控等,均可以用Spring Boot的開發風格作到一鍵啓動和部署。Spring Cloud並無重複製造輪子,它只是將目前各家公司開發的比較成熟、經得起實際考驗的服務框架組合起來,經過Spring Boot風格進行再封裝屏蔽掉了複雜的配置和實現原理,最終給開發者留出了一套簡單易懂、易部署和易維護的分佈式系統開發工具包。html

Spring Cloud 項目

  Spring Cloud是一系列框架集,包含了不少不一樣分佈式解決方案,主要項目有:git

集中式外部配置中心由Git倉庫管理。 配置資源直接映射到Spring環境,但若是須要,能夠由非Spring應用程序使用。github

與各類Netflix OSS組件集成 (如:Eureka, Hystrix, Zuul, Archaius, etc.).spring

事件總線用於將服務和服務實例與分佈式消息連接在一塊兒。對跨集羣傳遞狀態的變動很是有用(例如:配置更改事件)。 app

將應用程序與Pivotal Cloud Foundry集成。提供服務發現實現,並使資源很容易實現SSO和OAuth2的保護。 框架

提供了用於構建實現開放式Service Broker API的Service Broker的起點。 less

Leadership election and common stateful patterns with an abstraction and implementation for Zookeeper, Redis, Hazelcast, Consul.分佈式

領導選舉和帶有ZooKeeper、Redis、Hazelcast、Consul抽象和實現的公共狀態模式。 ide

使用Hashicorp Consul進行服務發現和配置管理。 工具

Provides support for load-balanced OAuth2 rest client and authentication header relays in a Zuul proxy. 

Distributed tracing for Spring Cloud applications, compatible with Zipkin, HTrace and log-based (e.g. ELK) tracing. 

    A cloud-native orchestration service for composable microservice applications on modern runtimes. Easy-to-use DSL, drag-and-drop GUI, and REST-APIs together simplifies the overall orchestration of microservice based data pipelines. 

    A lightweight event-driven microservices framework to quickly build applications that can connect to external systems. Simple declarative model to send and receive messages using Apache Kafka or RabbitMQ between Spring Boot apps. 

    Spring Cloud Stream App Starters are Spring Boot based Spring Integration applications that provide integration with external systems. 

    A short-lived microservices framework to quickly build applications that perform finite amounts of data processing. Simple declarative for adding both functional and non-functional features to Spring Boot apps. 

    Spring Cloud Task App Starters are Spring Boot applications that may be any process including Spring Batch jobs that do not run forever, and they end/stop after a finite period of data processing. 

    Service discovery and configuration management with Apache Zookeeper. 

    Easy integration with hosted Amazon Web Services. It offers a convenient way to interact with AWS provided services using well-known Spring idioms and APIs, such as the messaging or caching API. Developers can build their application around the hosted services without having to care about infrastructure or maintenance. 

    Makes it easy for PaaS applications in a variety of platforms to connect to backend services like databases and message brokers (the project formerly known as "Spring Cloud"). 

    Spring Boot-style starter projects to ease dependency management for consumers of Spring Cloud. (Discontinued as a project and merged with the other projects after Angel.SR2.) 

    Spring Boot CLI plugin for creating Spring Cloud component applications quickly in Groovy 

    Spring Cloud Contract is an umbrella project holding solutions that help users in successfully implementing the Consumer Driven Contracts approach. 

    Spring Cloud Gateway is an intelligent and programmable router based on Project Reactor. 

    Spring Cloud OpenFeign provides integrations for Spring Boot apps through autoconfiguration and binding to the Spring Environment and other Spring programming model idioms. 

    Spring Cloud Pipelines provides an opinionated deployment pipeline with steps to ensure that your application can be deployed in zero downtime fashion and easilly rolled back of something goes wrong. 

    Spring Cloud Function promotes the implementation of business logic via functions. It supports a uniform programming model across serverless providers, as well as the ability to run standalone (locally or in a PaaS).

Spring Cloud 版本

  Spring Cloud是一套分佈式解決方案,包含不少不一樣版本的不一樣組件,爲了不Spring Cloud版本和不一樣組件版本的混淆,Spring Cloud版本沒有采用版本號,而是使用了命名的方式(官方版本命名),如:Edgware、Finchley、Greenwich。

  官方網站羅列了四個版本(Release Train):  

    • Greenwich   2.1.x
    • Finchley     2.0.x
    • Edgware    1.5.x
    • Dalston    1.5.x

Finchley 版本建議與 SpringBoot 2.0.x 一塊兒使用,不建議與 SpringBoot 1.5.x 使用。

Dalston 版本和 Edgware 版本創建在SpringBoot 1.5.x 上,不建議與 SpringBoot2.0.x 使用。若是使用的是 SpringBoot2.0.x ,建議使用 Finchley 版本。

  注:Dalston 版本已經於2018年12月中止更新了。而 Edgware 版本將和 SpringBoot1.5.x 一塊兒更新,直至 SpringBoot1.5.x 不在更新爲止。我的推薦使用 Edgware 版本。

Camden 版本已經不在更新了, Camden 適用於 Spring Boot 1.4.x 版本的, 1.5.x 也測試經過了。

Brixton 版本適用於 Spring Boot 1.3.x, 1.4.x 也測試經過了。

Angel 版本適用於 Spring Boot 1.2.x。

附錄

  Spring Cloud 官方網站

  spring-cloud-contract示例

  Spring Cloud 中文社區

相關文章
相關標籤/搜索