先人一步
VMware 提供培训和认证,为您的进步加速。
了解更多我代表社区,很高兴地宣布 Spring Cloud Dalston 发布列车已于今天正式发布(RELEASE)。此版本可在 Maven Central 中找到。您可以查看 Dalston 发布说明 获取更多信息。
Spring Cloud Vault Config 是一个新项目,它通过 Hashicorp Vault 为分布式系统中的外部化秘密管理提供客户端支持。
Config Server 现在支持通过组合模式(Composite pattern)连接多个后端。这使得以前不可能实现的后端类型组合成为可能,例如:Vault 和 git 或多个 git 后端。现在支持对 AWS Codecommit 托管的 git 仓库进行身份验证。在之前的 Camden 版本中,Hashicorp Vault 已经被添加为 Config Server 的后端,与基于 VCS 的后端并存。
自核心 Spring Cloud 模块(Commons、Config、Netflix、Bus)诞生之初,DiscoveryClient
的实现都会自动将运行的客户端注册到发现服务器。这是最初的 Netflix Eureka 实现的副作用。现在服务注册和已注册服务的发现是独立的关注点。现在有一个 ServiceRegistry
接口,Spring Cloud Netflix、Consul 和 Zookeeper 都实现了它。默认情况下,客户端仍然会自动注册,但这可以通过 @EnableDiscoveryClient
的 autoRegister
属性禁用,或通过属性动态禁用。这还允许通过编程方式注册每个 JVM 的多个服务。更多细节请关注未来的博客文章。基于配置的 DiscoveryClient
也可用。
社区贡献了对 @LoadBalanced
AsyncRestTemplate
的支持。
Sleuth 中添加了对通用上下文传播系统的支持。它被称为“行李(baggage)”,并允许使用 Sleuth 已有的检测工具,在 HTTP 或消息传递等边界上传递任意属性。
另一个特性是基于注解的 Span 创建以及日志和标签的添加。这不仅减少了样板代码,而且在使用在运行时生成实现的框架(如 Spring Data)时也很有用。
Contract 得到了增强,以支持合同输入和输出的更多灵活性。添加了 Pact 支持以读取合同,而非 Groovy DSL。Contract 更具可插拔性,允许自定义 DSL 格式、测试和 Stub 生成以及 Stub Runner 实现。
除了支持新的 ServiceRegistry
API 外,Spring Cloud Consul 还支持 Consul 的特性,即注销僵尸服务(即,在可配置的时间内健康检查失败的服务将从 Consul 中移除)。
Dalston 基于 Spring Boot 1.5.x,这是最低要求的版本。其他更改包括各种库的升级、错误修复、文档和完善。非常感谢所有社区贡献的拉取请求和问题。
以下模块作为 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 |
一如既往,我们欢迎反馈:无论是在 GitHub、Gitter、Stack Overflow,还是在 Twitter 上。
要开始使用 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'
...
}