什么是 Spring Cloud ? 您所在的位置:网站首页 springcloud网关的作用是什么 什么是 Spring Cloud ?

什么是 Spring Cloud ?

#什么是 Spring Cloud ?| 来源: 网络整理| 查看: 265

Spring Cloud 为开发者提供了快速构建分布式系统中一些常见模式的工具(例如配置管理、服务发现、断路器、智能路由、微代理、控制总线、一次性令牌、全局锁、领导选举、分布式会话、集群状态)。分布式系统的协调导致了样板模式,使用 Spring Cloud 开发人员可以快速建立实现这些模式的服务和应用程序。它们将适用于任何分布式环境,包括开发人员自己的笔记本电脑、裸机数据中心和托管平台(如 Cloud Foundry)。

特征Spring Cloud 专注于为典型用例和可扩展性机制提供良好的开箱即用体验以覆盖其他用例。

分布式/版本化配置服务注册和发现路由服务到服务呼叫负载均衡断路器全局锁领导选举和集群状态分布式消息传递入门生成一个新的 Spring Cloud 项目最简单的入门方法是访问http://start.spring.io,选择您的 Spring Boot 版本和您要使用的 Spring Cloud 项目。这将在您生成项目时将相应的 Spring Cloud BOM 版本添加到您的 Maven/Gradle 文件中。

将 Spring Cloud 添加到现有的 Spring Boot 应用程序如果您想要将 Spring Cloud 添加到该应用程序的现有 Spring Boot 应用程序,第一步是确定您应该使用的 Spring Cloud 版本。您在应用中使用的版本取决于您使用的 Spring Boot 版本。

下表概述了 Spring Cloud 的哪个版本映射到 Spring Boot 的哪个版本。

发布系列 Spring Boot 兼容性

Spring Cloud Dalston、Edgware、Finchley 和 Greenwich 都已达到生命周期终止状态,不再受支持。

通过服务版本 (SR) 将错误修复和向后兼容功能添加到每个版本系列中。确定要使用哪个版本的 Spring Cloud 后,您应该使用该版本系列的最新服务版本。您可以在我们的发布说明页面上找到最新的服务发布信息。

既然您知道要使用哪个版本系列以及该版本系列的最新服务版本,您就可以将 Spring Cloud BOM 添加到您的应用程序中。

Hoxton.SR8

org.springframework.cloud

spring-cloud-dependencies

${spring.cloud-version}

pom

import

buildscript {

dependencies {

classpath "io.spring.gradle:dependency-management-plugin:1.0.10.RELEASE"

}

}

ext {

set(‘springCloudVersion’, “Hoxton.SR8”)

}

apply plugin: “io.spring.dependency-management”

dependencyManagement {

imports {

mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"

}

}

发布系列包含 spring-cloud-dependencies和 spring-cloud-starter-parent. 您可以像使用父对象一样使用spring-boot-starter-parent(如果您使用的是 Maven)。如果您只需要依赖管理,“依赖”版本是同一事物的仅 BOM 版本(它只包含依赖管理,没有插件声明或对 Spring 或 Spring Boot 的直接引用)。如果您使用的是 Spring Boot 父 POM,那么您可以使用 Spring Cloud 中的 BOM。相反的情况并非如此:使用 Cloud 父级使得不可能或至少不可靠地还使用 Boot BOM 来更改 Spring Boot 及其依赖项的版本。

就像 Spring Boot 一样,许多 Spring Cloud 项目都包含 starters,您可以将其添加为依赖项,以将各种云原生功能添加到您的项目中。在许多情况下,许多功能纯粹是通过将 starter 添加到类路径来启用的。起始名称记录在各个项目中。下面是一个示例,说明如何将 Spring Cloud Config Client 和 Spring Cloud Netflix Eureka 客户端添加到您的应用程序中。

org.springframework.cloud

spring-cloud-starter-config

org.springframework.cloud

spring-cloud-starter-netflix-eureka-client

dependencies {

compile ‘org.springframework.cloud:spring-cloud-starter-config’

compile ‘org.springframework.cloud:spring-cloud-starter-netflix-eureka-client’

//…

}

入门资源Spring Cloud 初学者指南主要项目春云配置由 git 存储库支持的集中外部配置管理。配置资源直接映射到 Spring,Environment但如果需要,可以由非 Spring 应用程序使用。

春云 Netflix与各种 Netflix OSS 组件(Eureka、Hystrix、Zuul、Archaius 等)集成。

春云巴士用于将服务和服务实例与分布式消息连接在一起的事件总线。用于在集群中传播状态更改(例如配置更改事件)。

Spring Cloud Cloudfoundry将您的应用程序与 Pivotal Cloud Foundry 集成。提供服务发现实现,还可以轻松实现 SSO 和 OAuth2 保护的资源。

Spring Cloud 开放服务代理提供构建实现 Open Service Broker API 的服务代理的起点。

Spring Cloud 集群领导选举和通用状态模式,具有 Zookeeper、Redis、Hazelcast、Consul 的抽象和实现。

Spring Cloud 领事使用 Hashicorp Consul 进行服务发现和配置管理。

春云安全为 Zuul 代理中的负载平衡 OAuth2 其余客户端和身份验证标头中继提供支持。

春云侦探Spring Cloud 应用程序的分布式跟踪,兼容 Zipkin、HTrace 和基于日志(例如 ELK)的跟踪。

Spring Cloud 数据流用于现代运行时上的可组合微服务应用程序的云原生编排服务。易于使用的 DSL、拖放式 GUI 和 REST-API 共同简化了基于微服务的数据管道的整体编排。

春云流一个轻量级的事件驱动微服务框架,用于快速构建可以连接到外部系统的应用程序。在 Spring Boot 应用程序之间使用 Apache Kafka 或 RabbitMQ 发送和接收消息的简单声明模型。

Spring Cloud Stream 应用程序Spring Cloud Stream 应用程序是开箱即用的 Spring Boot 应用程序,使用 Spring Cloud Stream 中的绑定器抽象提供与外部中间件系统(如 Apache Kafka、RabbitMQ 等)的集成。

Spring Cloud 任务一个短暂的微服务框架,用于快速构建执行有限数据处理量的应用程序。用于向 Spring Boot 应用程序添加功能和非功能特性的简单声明。

Spring Cloud Task 应用启动器Spring Cloud Task App Starters 是 Spring Boot 应用程序,可以是任何进程,包括不会永远运行的 Spring Batch 作业,它们在有限的数据处理时间后结束/停止。

春云动物园管理员使用 Apache Zookeeper 进行服务发现和配置管理。

Spring Cloud 连接器使各种平台中的 PaaS 应用程序可以轻松连接到后端服务,如数据库和消息代理(该项目以前称为“Spring Cloud”)。

Spring Cloud 初学者Spring Boot 风格的启动项目,以简化 Spring Cloud 消费者的依赖管理。(作为一个项目停止并与Angel.SR2之后的其他项目合并。)

Spring Cloud CLISpring Boot CLI 插件,用于在 Groovy 中快速创建 Spring Cloud 组件应用程序

Spring Cloud 合约Spring Cloud Contract 是一个包含解决方案的伞形项目,可帮助用户成功实施消费者驱动的合同方法。

春云网关Spring Cloud Gateway 是一个基于 Project Reactor 的智能可编程路由器。

Spring Cloud OpenFeignSpring Cloud OpenFeign 通过自动配置和绑定到 Spring Environment 和其他 Spring 编程模型习语,为 Spring Boot 应用程序提供集成。

Spring Cloud 管道Spring Cloud Pipelines 提供了一个自以为是的部署管道,其中包含确保您的应用程序可以以零停机时间的方式部署并轻松回滚出现问题的步骤。

春云功能Spring Cloud Function 通过函数促进业务逻辑的实现。它支持跨无服务器提供商的统一编程模型,以及独立运行(本地或在 PaaS 中)的能力。



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有