领先一步
VMware 提供培训和认证,助力您的职业发展。
了解更多我代表社区,很高兴地宣布 Spring Cloud 2020 Release Train 的 Release Candidate 1 (RC1) 版本已于今日发布。您可以在 Spring Milestone 仓库中找到该版本。有关更多信息,请参阅 2020 年的发布说明。
此版本需要 Spring Boot 2.4.0。
请参阅 wiki,了解此 Release Train 中的所有重大变更列表。
查看Github 项目中包含的所有 issue 和 pull request。
Gradle 插件在执行任务时创建了一个单独的 classpath。
HealthcheckServiceInstanceListSupplier
(PR)。LoadBalancer
选择可用相同实例的支持 (PR)。LoadBalancer
选择由 cookie 指定的可用实例的支持 (PR)。Spring Cloud Function 引入了两项新功能:支持 RSocket 和 Cloud Events。我们正在更新相关文档,以详细介绍这些功能,但您现在可以查看示例和集成测试用例以获取更多信息。对于 Cloud Events 支持,您可以查看 Cloud Events 示例以及最近发布的博客文章。对于 RSocket 支持,您可以查看一些测试用例,这些测试用例演示了如何通过 RSocket 调用函数。
随着 OpenTelemetry 的不断发展,我们决定将 OpenTelemetry 支持从 Spring Cloud Sleuth 移至一个孵化器项目。要继续在 Spring Cloud Sleuth 中使用 OpenTelemetry,您需要添加 Spring 仓库、spring-cloud-sleuth-otel-dependencies
BOM 和 spring-cloud-sleuth-otel-autoconfigure
依赖。
我们发布了与 2020.0.0-RC1
release train 兼容的 Spring Cloud Sleuth OTel 1.0.0-M1
版本。以下列表展示了如何在 Maven 和 Gradle 中使用它。
Maven
<properties>
<spring-cloud-sleuth-otel.version>1.0.0-M1</spring-cloud-sleuth-otel.version>
<spring-cloud.version>2020.0.0-RC1</spring-cloud.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-otel-dependencies</artifactId>
<!-- Provide the version of the Spring Cloud Sleuth OpenTelemetry project -->
<version>${spring-cloud-sleuth-otel.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-brave</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-otel-autoconfigure</artifactId>
</dependency>
<repositories>
<repository>
<id>spring-snapshots</id>
<url>https://repo.spring.io/snapshot</url>
<snapshots><enabled>true</enabled></snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<url>https://repo.spring.io/milestone</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<url>https://repo.spring.io/snapshot</url>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<url>https://repo.spring.io/milestone</url>
</pluginRepository>
</pluginRepositories>
Gradle
ext {
springCloudSleuthOtelVersion = "1.0.0-M1"
springCloudVersion = "2020.0.0-RC1"
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
mavenBom "org.springframework.cloud:spring-cloud-sleuth-otel-dependencies:${springCloudSleuthOtelVersion}"
}
}
dependencies {
implementation("org.springframework.cloud:spring-cloud-starter-sleuth") {
exclude group: 'org.springframework.cloud', module: 'spring-cloud-sleuth-brave'
}
implementation "org.springframework.cloud:spring-cloud-sleuth-otel-autoconfigure"
}
repositories {
mavenCentral()
maven {
url "https://repo.spring.io/snapshot"
}
maven {
url "https://repo.spring.io/milestone"
}
maven {
url "https://repo.spring.io/release"
}
}
JobApplicationRunner
。以下模块作为 2020.0.0-RC1 的一部分进行了更新
| 模块 | 版本 | 问题 |--- |--- |--- |--- | Spring Cloud Circuitbreaker | 2.0.0-RC1 | (问题) | Spring Cloud Contract | 3.0.0-RC1 | (问题) | Spring Cloud Kubernetes | 2.0.0-RC1 | (问题) | Spring Cloud Commons | 3.0.0-RC1 |
| Spring Cloud Openfeign | 3.0.0-RC1 |
| Spring Cloud Cloudfoundry | 3.0.0-RC1 |
| Spring Cloud Security | 3.0.0-RC1 |
| Spring Cloud Bus | 3.0.0-RC1 |
| Spring Cloud Cli | 3.0.0-RC1 |
| Spring Cloud Zookeeper | 3.0.0-RC1 | (问题) | Spring Cloud Sleuth | 3.0.0-RC1 | (问题) | Spring Cloud Consul | 3.0.0-RC1 |
| Spring Cloud Gateway | 3.0.0-RC1 |
| Spring Cloud Netflix | 3.0.0-RC1 | (问题) | Spring Cloud Vault | 3.0.0-RC1 | (问题) | Spring Cloud Config | 3.0.0-RC1 | (问题) | Spring Cloud Task | 2.3.0-RC1 | (问题)
一如既往,欢迎在 GitHub、Gitter、Stack Overflow 或 Twitter 上提供反馈。
以下列表展示了如何使用 BOM (仅依赖管理) 或 Gradle 启动 Maven 项目。
带 BOM 的 Maven
<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-RC1</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.2.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-RC1'
}
}
dependencies {
compile 'org.springframework.cloud:spring-cloud-starter-config'
compile 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
...
}