抢占先机
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'
...
}