spring cloud

什么是Spring Cloud

  Spring Cloud是一系列框架的有序集合。它利用Spring Boot的开发便利性巧妙地简化了分布式系统基础设施的开发,例如:配置管理、服务发现、断路器、智能路由、微代理、控制总线、一次性令牌、全局锁、领导选择、分布式会话、群集状态、数据监控等,都可以用Spring Boot的开发风格做到一键启动和部署。Spring Cloud并没有重复制造轮子,它只是将目前各家公司开发的比较成熟、经得起实际考验的服务框架组合起来,通过Spring Boot风格进行再封装屏蔽掉了复杂的配置和实现原理,最终给开发者留出了一套简单易懂、易部署和易维护的分布式系统开发工具包。

Spring Cloud 项目

  Spring Cloud是一系列框架集,包含了很多不同分布式解决方案,主要项目有:

集中式外部配置中心由Git仓库管理。 配置资源直接映射到Spring环境,但如果需要,可以由非Spring应用程序使用。

与各种Netflix OSS组件集成 (如:Eureka, Hystrix, Zuul, Archaius, etc.).

事件总线用于将服务和服务实例与分布式消息链接在一起。对跨集群传递状态的变更非常有用(例如:配置更改事件)。 

将应用程序与Pivotal Cloud Foundry集成。提供服务发现实现,并使资源很容易实现SSO和OAuth2的保护。 

提供了用于构建实现开放式Service Broker API的Service Broker的起点。 

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

领导选举和带有ZooKeeper、Redis、Hazelcast、Consul抽象和实现的公共状态模式。 

使用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 中文社区

posted @ 2019-09-25 07:59  Mr.yang.localhost  阅读(263)  评论(0编辑  收藏  举报