Spring Cloud

关注微信公众号:
huyouxiao.com
回复语言名称,比如java,python,go,C, C++.有海量资源免费赠送!
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.

Spring Cloud builds on Spring Boot by providing a bunch of libraries that enhance the behaviour of an application when added to the classpath. You can take advantage of the basic default behaviour to get started really quickly, and then when you need to, you can configure or extend to create a custom solution.

Quick Start

The release train label (see below) is actually only used explicitly in one artifact: “spring-cloud-dependencies” (all the others have normal numeric release labels tied to their parent project). The depednencies POM is the one you can use as a BOM for dependency management. Example using the latest version with the config client and eureka (change the artifact ids to pull in other starters):
Download
Maven
Gradle

The recommended way to get started using spring-cloud in your project is with a dependency management system – the snippet below can be copied and pasted into your build. Need help? See our getting started guides on building with Maven and Gradle.

org.springframework.boot spring-boot-starter-parent 2.0.0.M3 org.springframework.cloud spring-cloud-dependencies Finchley.M2 pom import spring-cloud-starter-config spring-cloud-starter-eureka spring-milestones Spring Milestones https://repo.spring.io/libs-milestone false

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

Spring Cloud takes a very declarative approach, and often you get a lot of fetaures with just a classpath change and/or an annotation. Example application that is a discovery client:

@SpringBootApplication
@EnableDiscoveryClient
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}

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 Cloudfoundry. Provides a service discovery implementation and also makes it easy to implement SSO and OAuth2 protected resources, and also to create a Cloudfoundry service broker.
Spring Cloud Cloud Foundry Service Broker

Provides a starting point for building a service broker that manages a Cloud Foundry managed service.
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.
Release Trains

Spring Cloud is an umbrella project consisting of independent projects with, in principle, different release cadences. To manage the portfolio a BOM (Bill of Materials) is published with a curated set of dependencies on the individual project (see below). The release trains have names, not versions, to avoid confusion with the sub-projects. The names are an alphabetic sequence (so you can sort them chronologically) with names of London Tube stations (“Angel” is the first release, “Brixton” is the second). When point releases of the individual projects accumulate to a critical mass, or if there is a critical bug in one of them that needs to be available to everyone, the release train will push out “service releases” with names ending “.SRX”, where “X” is a number.

Release train contents:
Component Camden.SR7 Dalston.SR4 Edgware.M1 Finchley.M2 Finchley.BUILD-SNAPSHOT
spring-cloud-aws 1.1.4.RELEASE 1.2.1.RELEASE 1.2.1.RELEASE 2.0.0.M1 2.0.0.BUILD-SNAPSHOT
spring-cloud-bus 1.2.2.RELEASE 1.3.1.RELEASE 1.3.1.RELEASE 2.0.0.M1 2.0.0.BUILD-SNAPSHOT
spring-cloud-cli 1.2.4.RELEASE 1.3.4.RELEASE 1.4.0.M1 2.0.0.M1 2.0.0.BUILD-SNAPSHOT
spring-cloud-commons 1.1.9.RELEASE 1.2.4.RELEASE 1.3.0.M1 2.0.0.M2 2.0.0.BUILD-SNAPSHOT
spring-cloud-contract 1.0.5.RELEASE 1.1.4.RELEASE 1.2.0.M1 2.0.0.M2 2.0.0.BUILD-SNAPSHOT
spring-cloud-config 1.2.3.RELEASE 1.3.3.RELEASE 1.4.0.M1 2.0.0.M2 2.0.0.BUILD-SNAPSHOT
spring-cloud-netflix 1.2.7.RELEASE 1.3.5.RELEASE 1.4.0.M1 2.0.0.M2 2.0.0.BUILD-SNAPSHOT
spring-cloud-security 1.1.4.RELEASE 1.2.1.RELEASE 1.2.1.RELEASE 2.0.0.M1 2.0.0.BUILD-SNAPSHOT
spring-cloud-cloudfoundry 1.0.1.RELEASE 1.1.0.RELEASE 1.1.0.RELEASE 2.0.0.M1 2.0.0.BUILD-SNAPSHOT
spring-cloud-consul 1.1.4.RELEASE 1.2.1.RELEASE 1.2.1.RELEASE 2.0.0.M1 2.0.0.BUILD-SNAPSHOT
spring-cloud-sleuth 1.1.3.RELEASE 1.2.5.RELEASE 1.3.0.M1 2.0.0.M2 2.0.0.BUILD-SNAPSHOT
spring-cloud-stream Brooklyn.SR3 Chelsea.SR2 Ditmars.M2 Elmhurst.M1 Elmhurst.BUILD-SNAPSHOT
spring-cloud-zookeeper 1.0.4.RELEASE 1.1.2.RELEASE 1.2.0.M1 2.0.0.M1 2.0.0.BUILD-SNAPSHOT
spring-boot 1.4.5.RELEASE 1.5.4.RELEASE 1.5.6.RELEASE 2.0.0.M3 2.0.0.M3
spring-cloud-task 1.0.3.RELEASE 1.1.2.RELEASE 1.2.0.RELEASE 2.0.0.M1 2.0.0.RELEASE
spring-cloud-vault 1.0.2.RELEASE 1.1.0.M1 2.0.0.M2 2.0.0.BUILD-SNAPSHOT
spring-cloud-gateway 1.0.0.M1 2.0.0.M2 2.0.0.BUILD-SNAPSHOT

Finchley builds and works with Spring Boot 2.0.x, and is not expected to work with Spring Boot 1.5.x.

The Dalston and Edgware release trains build on Spring Boot 1.5.x, and are not expected to work with Spring Boot 2.0.x.

The Camden release train builds on Spring Boot 1.4.x, but is also tested with 1.5.x.

The Brixton release train builds on Spring Boot 1.3.x, but is also tested with 1.4.x.

The Angel release train builds on Spring Boot 1.2.x, and is incompatible in some areas with Spring Boot 1.3.x. Brixton builds on Spring Boot 1.3.x and is similarly incompatible with 1.2.x. Some libraries and most apps built on Angel will run fine on Brixton, but changes will be required anywhere that the OAuth2 features from spring-cloud-security 1.0.x are used (they were mostly moved to Spring Boot in 1.3.0).

Use your dependency management tools to control the version. If you are using Maven remember that the first version declared wins, so declare the BOMs in order, with the first one usually being the most recent (e.g. if you want to use Spring Boot 1.3.6 with Brixton.RELEASE, put the Boot BOM first). The same rule applies to Gradle if you use the Spring dependency management plugin.

NOTE: The release train contains a spring-cloud-dependencies as well as the spring-cloud-starter-parent. You can use the parent as you would the spring-boot-starter-parent (if you are using Maven). If you only need dependency management, the "dependencies" version is a BOM-only version of the same thing (it just contains dependency management and no plugin declarations or direct references to Spring or Spring Boot). If you are using the Spring Boot parent POM, then you can use the BOM from Spring Cloud. The opposite is not true: using the Cloud parent makes it impossible, or at least unreliable, to also use the Boot BOM to change the version of Spring Boot and its dependencies.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值