搶佔先機
VMware 提供培訓和認證,助您加速進步。
瞭解更多我代表社群很高興地宣佈,Spring Cloud Finchley 釋出列車的通用版本 (RELEASE) 今天已可用。該版本可在 Maven Central 中找到。您可以在 Finchley 釋出說明中檢視更多資訊。
Camden 釋出列車已達到生命週期結束狀態。Dalston 釋出列車將於 2018 年 12 月達到生命週期結束狀態。Edgware 釋出列車將遵循 Spring Boot 1.5.x 系列的生命週期結束。
Spring Cloud Function 和 Spring Cloud Gateway 是 Spring Cloud 產品組合的新增成員。該組合還與 Spring Boot 2.0.x 相容,這是一項重要的工作。Spring Cloud 現在要求最低 Java 版本為 8。
Spring Cloud Gateway 是基於 Spring Webflux 和 Reactor Netty 構建的 API 閘道器。它是下一代閘道器,可以被視為 Spring Cloud Netflix Zuul 的替代品。它基於易於定義的謂詞提供動態路由。它還提供作用域限定在每個路由的過濾器,例如:路徑重寫、斷路器、新增或刪除頭部、限流和安全。路由可以使用屬性或使用包含的對 DiscoveryClient
(Eureka、Consul & Zookeeper)的支援來定義。
Spring Cloud Function 是一個具有以下高階目標的專案
sleuth-stream
#555 和 zipkin-stream
#727 依賴。透過訊息傳遞的 Span 只能透過原生的 Zipkin 依賴傳送到 Zipkin。spring.zipkin.sender.type=kafka
需要明確設定,才能透過 Kafka 傳送 Span #985, #1013TraceKeys
對使用者隱藏並已棄用 #940示例:https://github.com/spring-cloud-samples/sleuth-documentation-apps, https://github.com/openzipkin/sleuth-webmvc-example
spring-cloud-netflix-hystrix-amqp
已被移除ZuulFallbackProvider
已被移除,並替換為 FallbackProvider
#2262/hystrix.stream
現在使用 WebFlux #2629/clusters
端點,可用於發現配置的叢集 #2223請參閱釋出部落格文章。
WebClient
上使用 @LoadBalanced
註解stubsMode
和 contractsMode
引入存根獲取的顯式模式 #287@AutoConfigureStubRunner
成為測試 slice #473@StubRunnerPort
方便查詢存根的機制 #5732.18.0
#659示例:https://github.com/spring-cloud-samples/spring-cloud-contract-samples/
請參閱釋出部落格文章。
ReactiveVaultOperations
的自動配置,在 WebClient
之上提供響應式 API #133。示例:https://github.com/mp911de/spring-cloud-vault-config-samples/
Actuator 端點已更新為使用新的 Actuator 框架。
使用了新的響應式 Cloud Foundry Java Client。
添加了對 HTTPS 例項和 ACL 的支援。`@Scheduled` 不再用於 Consul watch。
更新為使用 Curator 4.0.1。
添加了對使用 AWS Parameter Store 的 PropertySourceLocator 的支援。添加了對 CloudWatch 指標的 Micrometer 支援。
以下模組作為 Finchley.RELEASE 的一部分進行了更新
模組 | 版本 |
---|---|
Spring Cloud Consul | 2.0.0.RELEASE |
Spring Cloud Gateway | 2.0.0.RELEASE |
Spring Cloud Function | 1.0.0.RELEASE |
Spring Cloud Zookeeper | 2.0.0.RELEASE |
Spring Cloud Sleuth | 2.0.0.RELEASE |
Spring Cloud Aws | 2.0.0.RELEASE |
Spring Cloud Config | 2.0.0.RELEASE |
Spring Cloud Cloudfoundry | 2.0.0.RELEASE |
Spring Cloud Security | 2.0.0.RELEASE |
Spring Cloud Netflix | 2.0.0.RELEASE |
Spring Cloud Task | 2.0.0.RELEASE |
Spring Cloud Commons | 2.0.0.RELEASE |
Spring Cloud Contract | 2.0.0.RELEASE |
Spring Cloud Stream | Elmhurst.RELEASE |
Spring Cloud Vault | 2.0.0.RELEASE |
Spring Cloud Bus | 2.0.0.RELEASE |
Spring Cloud Openfeign | 2.0.0.RELEASE |
一如既往,我們歡迎透過 GitHub、Gitter、Stack Overflow 或 Twitter 提供反饋。
使用 Maven 和 BOM(僅依賴管理)入門
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Finchley.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-netflix-eureka-client</artifactId>
</dependency>
...
</dependencies>
或使用 Gradle
buildscript {
dependencies {
classpath "io.spring.gradle:dependency-management-plugin:1.0.5.RELEASE"
}
}
apply plugin: "io.spring.dependency-management"
dependencyManagement {
imports {
mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Finchley.RELEASE'
}
}
dependencies {
compile 'org.springframework.cloud:spring-cloud-starter-config'
compile 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
...
}