Spring Cloud Dalston 发布

发布 | Spencer Gibb | 2017年4月12日 | ...

我很高兴代表社区宣布,Spring Cloud Dalston 发布列车的通用版本(RELEASE)今天已可用。该版本可在 Maven Central 中找到。您可以查看 Dalston 发布说明以获取更多信息

Dalston 发布列车中的显著变化

Vault

Spring Cloud Vault Config 是一个新项目,它通过 Hashicorp Vault 为分布式系统中的外部化密钥管理提供客户端支持。

Config Server

Config Server 现在通过组合模式支持多个后端。这使得以前不可能实现的后端类型组合成为可能,例如:Vault 和 Git 或多个 Git 后端。现在支持对 AWS Codecommit 托管的 Git 仓库进行身份验证。在之前的 (Camden) 版本中,Hashicorp Vault 已经作为 Config Server 的后端添加到基于 VCS 的后端中。

Spring Cloud Commons

从核心 Spring Cloud 模块(Commons、Config、Netflix、Bus)开始,DiscoveryClient 的实现会自动将正在运行的客户端注册到发现服务器。这是最初 Netflix Eureka 实现的副作用。现在,服务注册和已注册服务的发现是独立关注点。现在有一个 ServiceRegistry 接口,Spring Cloud Netflix、Consul 和 Zookeeper 都实现了它。默认情况下,客户端仍然自动注册,但可以通过 @EnableDiscoveryClientautoRegister 属性或通过属性动态禁用。这也允许每个 JVM 注册多个服务。请关注未来的博客文章以获取更多详细信息。还提供了一个基于配置的 DiscoveryClient

社区贡献了对 @LoadBalanced AsyncRestTemplate 的支持。

Sleuth

Sleuth 中添加了对通用上下文传播系统的支持。它被称为“baggage”,允许使用 Sleuth 已有的内置仪器,通过 HTTP 或消息等边界传递任意属性。

另一个功能是基于注解的 Span 创建以及日志和标签的添加。这不仅减少了样板代码,而且在处理运行时生成实现(如 Spring Data)的框架时也很有用。

Contract

Contract 得到了增强,以支持合同输入和输出的更大灵活性。增加了 Pact 支持以读取合同,而不是 Groovy DSL。Contract 变得更具可插拔性,允许自定义 DSL 格式、测试和 Stub 生成以及 Stub Runner 实现。

Consul

除了支持新的 ServiceRegistry API,Spring Cloud Consul 还支持 Consul 的功能,即注销僵尸服务(即,在可配置的时间内健康检查失败的服务将从 Consul 中移除)。

其他

Dalston 基于 Spring Boot 1.5.x,这是最低要求版本。其他变化包括各种库的升级、bug 修复、文档和完善。非常感谢社区对 pull requests 和 issue 的所有贡献。

以下模块作为 Dalston.RELEASE 的一部分进行了更新

模块 版本
Spring Cloud AWS 1.2.0.RELEASE
Spring Cloud Build 1.3.1.RELEASE
Spring Cloud Bus 1.3.0.RELEASE
Spring Cloud Cloudfoundry 1.1.0.RELEASE
Spring Cloud Commons 1.2.0.RELEASE
Spring Cloud Config 1.3.0.RELEASE
Spring Cloud Consul 1.2.0.RELEASE
Spring Cloud Contract 1.1.0.RELEASE
Spring Cloud Netflix 1.3.0.RELEASE
Spring Cloud Security 1.2.0.RELEASE
Spring Cloud Sleuth 1.2.0.RELEASE
Spring Cloud Stream Chelsea.SR1
Spring Cloud Task 1.1.1.RELEASE
Spring Cloud Vault Config 1.0.0.RELEASE
Spring Cloud Zookeeper 1.1.0.RELEASE
Spring Cloud Thin Launcher 1.1.0.RELEASE
Spring Cloud CLI 1.3.0.RELEASE

一如既往,我们欢迎反馈:可以在 GitHubGitterStack OverflowTwitter 上提供。

Maven 起步使用 BOM(仅依赖管理)

<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-dependencies</artifactId>
      <version>Dalston.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-eureka</artifactId>
  </dependency>
  ...
</dependencies>

或使用 Gradle

buildscript {
  dependencies {
    classpath "io.spring.gradle:dependency-management-plugin:1.0.0.RELEASE"
  }
}
apply plugin: "io.spring.dependency-management"

dependencyManagement {
  imports {
    mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Dalston.RELEASE'
  }
}

dependencies {
    compile 'org.springframework.cloud:spring-cloud-starter-config'
    compile 'org.springframework.cloud:spring-cloud-starter-eureka'
    ...
}

获取 Spring 新闻通讯

通过 Spring 新闻通讯保持联系

订阅

领先一步

VMware 提供培训和认证,助您加速进步。

了解更多

获得支持

Tanzu Spring 提供 OpenJDK™、Spring 和 Apache Tomcat® 的支持和二进制文件,只需一份简单的订阅。

了解更多

即将举行的活动

查看 Spring 社区所有即将举行的活动。

查看所有