领先一步
VMware 提供培训和认证,助您加速进步。
了解更多我很高兴地代表社区宣布,Spring Cloud 2020 Release Train 的发布候选版 1 (RC1) 今天已发布。您可以在 Spring Milestone 仓库中找到此版本。有关更多信息,请参阅 2020 年的 发布说明。
此版本需要 Spring Boot 2.4.0。
请参阅 Wiki 查看此发布系列中所有破坏性更改的列表。
请在 Github 项目中查看所有包含的问题和拉取请求。
Gradle 插件 在执行任务时会创建一个单独的类路径。
HealthcheckServiceInstanceListSupplier(PR)。LoadBalancerProperties 已重新打包。LoadBalancer 在可用时选择同一实例的支持(PR)。Spring Cloud Function 引入了两项新功能:对 RSocket 和 Cloud Events 的支持。虽然我们正在更新文档以提供这些功能的详细信息,但您可以立即查看示例和集成测试用例以获取更多信息。有关 Cloud Events 支持,您可以查看 Cloud Events 示例以及最近发布的 博客文章。有关 RSocket 支持,您可以查看 一些演示如何通过 RSocket 调用函数的测试用例。
随着 OpenTelemetry 的不断发展,我们已决定将 OpenTelemetry 支持从 Spring Cloud Sleuth 移至一个孵化项目。要继续将 OpenTelemetry 与 Spring Cloud Sleuth 结合使用,您需要添加 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 | (issues) | Spring Cloud Contract | 3.0.0-RC1 | (issues) | Spring Cloud Kubernetes | 2.0.0-RC1 | (issues) | 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 | (issues) | Spring Cloud Sleuth | 3.0.0-RC1 | (issues) | Spring Cloud Consul | 3.0.0-RC1 |
| Spring Cloud Gateway | 3.0.0-RC1 |
| Spring Cloud Netflix | 3.0.0-RC1 | (issues) | Spring Cloud Vault | 3.0.0-RC1 | (issues) | Spring Cloud Config | 3.0.0-RC1 | (issues) | Spring Cloud Task | 2.3.0-RC1 | (issues)
一如既往,我们欢迎大家在 GitHub、Gitter、Stack Overflow 或 Twitter 上提供反馈。
以下列表显示了如何通过 BOM(仅依赖管理)或 Gradle 开始使用 Maven。
Maven with 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-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'
...
}