先人一步
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'
...
}