Spring Cloud Greenwich.SR6、Hoxton.SR5 和 2020.0.0-M2 (又名 Ilford) 已发布

发布 | Spencer Gibb | 2020年6月1日 | ...

我谨代表社区,很高兴地宣布,今天发布了以下版本:Spring Cloud Greenwich Release Train 的 Service Release 6 (SR6),Spring Cloud Hoxton Release Train 的 Service Release 5 (SR5),以及 Spring Cloud 2020.0 (代号 Ilford) Release Train 的 Milestone 2 (M2)。Greenwich 和 Hoxton 版本可以在 Maven Central 找到,在此在此Ilford milestone 可以在 Spring Milestone 仓库中找到。您可以查看单独的发布说明以获取更多信息:Greenwich.SR6, Hoxton.SR52020.0.0-M2

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


Greenwich Release Train 的主要变更

Github 项目

Greenwich 与 Spring Boot 2.1.x 兼容。

Spring Cloud Config

CVE-2020-5410: spring-cloud-config-server 的目录遍历漏洞

Spring Cloud Commons

回溯修复了 bootstrap 属性源排序问题。

作为 Greenwich.SR6 的一部分,以下模块已更新:

| 模块 | 版本 | 问题 |--- |--- |--- |--- | Spring Cloud Config | 2.1.8.RELEASE |
| Spring Cloud Commons | 2.1.6.RELEASE | (问题)

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

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

或使用 Gradle

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

apply plugin: "io.spring.dependency-management"

dependencyManagement {
  imports {
    mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Greenwich.SR6'
  }
}

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

Hoxton 发行版列车中的显著更改

Github 项目.

Hoxton.SR5 与 Spring Boot 2.3.x 和 2.2.x 都兼容。之前的 Hoxton 版本仅与 Spring Boot 2.2.x 兼容。

Spring Cloud CLI 未作为 Hoxton.SR5 的一部分发布,请查找 Hoxton.SR6 版本。

Spring Cloud Contract

添加了对 Spring Cloud LoadBalancer 的支持。请参阅 发布说明,了解有关升级和 Spring Cloud Contract Gradle 插件的次要 API 更改的信息。

Spring Cloud Kubernetes

向 health endpoint 添加了标签。

Spring Cloud Commons

添加了 Builders 来配置 Spring Cloud LoadBalancer 以及预配置的 loadBalancers。调整了 LoadBalancer 缓存机制以支持 HealthCheckInstanceListSupplier。添加了对非枚举属性源的支持。添加了对缓存的随机属性源的支持,因此具有随机值的服务实例 ID 在刷新事件期间不会被重新定义。请参阅 发布说明,了解有关两个属性值默认值更改的信息。

Spring Cloud Netflix

Eureka Client 现在在 bootstrap 期间使用 Eureka HTTP API,以便实例不会在注册后立即注销。

Spring Cloud Consul

添加了对 Consul 元数据而不是标签中的元数据的支持。

Spring Cloud Config

更新了对 Vault Azure MSI 身份验证的支持。

Spring Cloud Gateway

添加了对自定义 Host 头部的支持。

Spring Cloud Zookeeper

添加了一个 CuratorFrameworkCustomizer,允许用户在自动配置后自定义 Curator。

Spring Cloud Bus

@RemoteApplicationEventsScan 的结果现在是累积的。RefreshRemoteApplicationEvent 仅在目标是本地时才会在本地处理。

Spring Cloud Openfeign

添加了对 Spring Data 分页排序的支持。添加了禁用单个 feign 客户端父上下文的功能。添加了一个 ErrorDecoderFactory

Spring Cloud Sleuth

ExceptionLoggingFilter 默认禁用。

作为 Hoxton.SR5 的一部分,以下模块已更新:

| 模块 | 版本 | 问题 |--- |--- |--- |--- | Spring Cloud Contract | 2.2.3.RELEASE | (问题) | Spring Cloud Kubernetes | 1.1.3.RELEASE | (问题) | Spring Cloud Cloudfoundry | 2.2.2.RELEASE | (问题) | Spring Cloud Commons | 2.2.3.RELEASE | (问题) | Spring Cloud Starter Build | Hoxton.SR5 |
| Spring Cloud Netflix | 2.2.3.RELEASE | (问题) | Spring Cloud Consul | 2.2.3.RELEASE | (问题) | Spring Cloud Config | 2.2.3.RELEASE | (问题) | Spring Cloud Gateway | 2.2.3.RELEASE | (问题) | Spring Cloud Gcp | 1.2.3.RELEASE |
| Spring Cloud Zookeeper | 2.2.2.RELEASE | (问题) | Spring Cloud Vault | 2.2.3.RELEASE | (问题) | Spring Cloud Circuitbreaker | 1.0.3.RELEASE | (问题) | Spring Cloud Bus | 2.2.2.RELEASE | (问题) | Spring Cloud Security | 2.2.2.RELEASE | (问题) | Spring Cloud Openfeign | 2.2.3.RELEASE | (问题) | Spring Cloud Aws | 2.2.2.RELEASE | (问题) | Spring Cloud Sleuth | 2.2.3.RELEASE | (问题)

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

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

或使用 Gradle

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

apply plugin: "io.spring.dependency-management"

dependencyManagement {
  imports {
    mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Hoxton.SR5'
  }
}

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

2020.0 Release Train 的显著变化

Github 项目

Spring Cloud Netflix

Eureka Client 现在默认使用 WebClientRestTemplate,而不是 Jersey。

Spring Cloud Sleuth

Zipkin 依赖已从核心移除。

Spring Cloud Gateway

Java Route DSL 已得到增强,以避免泄露 Route 方法。这有助于避免对 DSL 使用方式的混淆。

Spring Cloud Commons

spring.cloud.loadbalancer.health-check.initial-delay 配置已从 int 更改为 Duration

Spring Cloud Openfeign

Targeter 接口和 FeignClientFactoryBean 已公开。

作为 2020.0.0-M2 的一部分,以下模块已更新:

| 模块 | 版本 | 问题 |--- |--- |--- |--- | Spring Cloud Netflix | 3.0.0-M2 |
| Spring Cloud Sleuth | 3.0.0-M2 |
| Spring Cloud Consul | 3.0.0-M2 |
| Spring Cloud Kubernetes | 2.0.0-M2 |
| Spring Cloud Gateway | 3.0.0-M2 | (问题) | Spring Cloud Circuitbreaker | 2.0.0-M2 |
| Spring Cloud Contract | 3.0.0-M2 | (问题) | Spring Cloud Starter Build | 2020.0.0-M2 |
| Spring Cloud Config | 3.0.0-M2 |
| Spring Cloud Build | 3.0.0-M2 |
| Spring Cloud Cloudfoundry | 3.0.0-M2 |
| Spring Cloud Security | 3.0.0-M2 |
| Spring Cloud Bus | 3.0.0-M2 |
| Spring Cloud Cli | 3.0.0-M2 |
| Spring Cloud Vault | 3.0.0-M2 |
| Spring Cloud Zookeeper | 3.0.0-M2 |
| Spring Cloud Commons | 3.0.0-M2 |
| Spring Cloud Openfeign | 3.0.0-M2 |

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

<repositories>
    <repository>
        <id>spring-milestones</id>
        <name>Spring Milestones</name>
        <url>https://repo.spring.io/milestone</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
</repositories>
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>2020.0.0-M2</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>

或使用 Gradle

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

repositories {
  maven {
    url 'https://repo.spring.io/milestone'
  }
}

apply plugin: "io.spring.dependency-management"

dependencyManagement {
  imports {
    mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2020.0.0-M2'
  }
}

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

获取 Spring 新闻通讯

通过 Spring 新闻通讯保持联系

订阅

领先一步

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

了解更多

获得支持

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

了解更多

即将举行的活动

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

查看所有