Spring Cloud简介

2 篇文章 0 订阅

Spring Cloud简介

Introduction

Spring Cloud 是一系列框架的有序集合。它利用Spring Boot的开发便利性巧妙地简化了分布式系统基础设施的开发,如服务发现注册、配置中心、消息总线、负载均衡、断路器、数据监控等,都可以用Spring Boot的开发风格做到一键启动和部署。Spring Cloud并没有重复制造轮子,它只是将目前各家公司开发的比较成熟、经得起实际考验的服务框架组合起来,通过Spring Boot风格进行再封装屏蔽掉了复杂的配置和实现原理,最终给开发者留出了一套简单易懂、易部署和易维护的分布式系统开发工具包。

URL : https://cloud.spring.io/
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.

Quick Start

官网QuickStart例子中提供了,Finchley,Edgware SR4,Dalston SR5等多个版本。
同时提供了各版本的maven及gradle的配置代码。

如下是:Finchley current GA 版本的maven配置代码。

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.0.1.RELEASE</version>
</parent>
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>Finchley.RELEASE</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>
<dependencies>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-config</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
    </dependency>
</dependencies>

由以上代码可见,其中包含了spring-boot-starter-parent , spring-cloud-dependencies , spring-cloud-starter-config 及spring-cloud-starter-netflix-eureka-client。

Spring Cloud是基于Spring Boot,可以在Spring Boot中加入对应的组件使用。使用IDE编辑的时候,首先即是新建Spring Boot项目。

Spring Cloud’s Main Projects

Spring Cloud Config

Centralized external configuration management backed by a git repository. The configuration resources map directly to Spring Environment but could be used by non-Spring applications if desired.

Spring Cloud Netflix

Integration with various Netflix OSS components (Eureka, Hystrix, Zuul, Archaius, etc.).

Spring Cloud Bus

An event bus for linking services and service instances together with distributed messaging. Useful for propagating state changes across a cluster (e.g. config change events).

Spring Cloud for Cloud Foundry

Integrates your application with Pivotal Cloud Foundry. Provides a service discovery implementation and also makes it easy to implement SSO and OAuth2 protected resources.

Spring Cloud Open Service Broker

Provides a starting point for building a service broker that implements the Open Service Broker API.

Spring Cloud Cluster

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

Spring Cloud Consul

Service discovery and configuration management with Hashicorp Consul.

Spring Cloud Security

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

Spring Cloud Sleuth

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

Spring Cloud Data Flow

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.

Spring Cloud Stream

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

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

Spring Cloud Task

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

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.

Spring Cloud Zookeeper

Service discovery and configuration management with Apache Zookeeper.

Spring Cloud for Amazon Web Services

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.

Spring Cloud Connectors

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 Cloud Starters

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 Cloud CLI

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

Spring Cloud Contract

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

Spring Cloud Gateway

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

Spring Cloud OpenFeign

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

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 组件版本对照表

ComponentEdgware.SR4Finchley.RELEASEFinchley.BUILD-SNAPSHOT
spring-cloud-aws1.2.3.RELEASE2.0.0.RELEASE2.0.1.BUILD-SNAPSHOT
spring-cloud-bus1.3.3.RELEASE2.0.0.RELEASE2.0.1.BUILD-SNAPSHOT
spring-cloud-cli1.4.1.RELEASE2.0.0.RELEASE2.0.1.BUILD-SNAPSHOT
spring-cloud-commons1.3.4.RELEASE2.0.0.RELEASE2.0.1.BUILD-SNAPSHOT
spring-cloud-contract1.2.5.RELEASE2.0.0.RELEASE2.0.1.BUILD-SNAPSHOT
spring-cloud-config1.4.4.RELEASE2.0.0.RELEASE2.0.1.BUILD-SNAPSHOT
spring-cloud-netflix1.4.5.RELEASE2.0.0.RELEASE2.0.1.BUILD-SNAPSHOT
spring-cloud-security1.2.3.RELEASE2.0.0.RELEASE2.0.1.BUILD-SNAPSHOT
spring-cloud-cloudfoundry1.1.2.RELEASE2.0.0.RELEASE2.0.1.BUILD-SNAPSHOT
spring-cloud-consul1.3.4.RELEASE2.0.0.RELEASE2.0.1.BUILD-SNAPSHOT
spring-cloud-sleuth1.3.4.RELEASE2.0.0.RELEASE2.0.1.BUILD-SNAPSHOT
spring-cloud-streamDitmars.SR4Elmhurst.RELEASEElmhurst.BUILD-SNAPSHOT
spring-cloud-zookeeper1.2.2.RELEASE2.0.0.RELEASE2.0.1.BUILD-SNAPSHOT
spring-boot1.5.14.RELEASE2.0.2.RELEASE2.0.1.BUILD-SNAPSHOT
spring-cloud-task1.2.3.RELEASE2.0.0.RELEASE2.0.1.BUILD-SNAPSHOT
spring-cloud-vault1.1.1.RELEASE2.0.0.RELEASE2.0.1.BUILD-SNAPSHOT
spring-cloud-gateway1.0.2.RELEASE2.0.0.RELEASE2.0.1.BUILD-SNAPSHOT
spring-cloud-openfeign2.0.0.RELEASE2.0.1.BUILD-SNAPSHOT
spring-cloud-function1.0.0.RELEASE1.0.0.RELEASE1.0.1.BUILD-SNAPSHOT
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值