昆明网站建设推广服务,网站推广怎么做,yum安装wordpress,国都建设(集团)有限公司网站距离Spring Boot 2.2.0的发布已经有一个半月左右时间#xff0c;由于与之匹配的Spring Cloud版本一直没有Release#xff0c;所以在这期间碰到不少读者咨询的问题都是由于Spring Boot和Spring Cloud版本不匹配导致。
很多时候#xff0c;我们在学习或重建系统的时候都喜欢直…距离Spring Boot 2.2.0的发布已经有一个半月左右时间由于与之匹配的Spring Cloud版本一直没有Release所以在这期间碰到不少读者咨询的问题都是由于Spring Boot和Spring Cloud版本不匹配导致。
很多时候我们在学习或重建系统的时候都喜欢直接选用最高版本来开发但是在使用Spring全家桶的时候这样的选择不一定是最佳选择。主要还是由于Spring全家桶中各项目之间还存在一定的依赖关系。尤其是在大版本迭代期间是我们尤其要注意的。比如这次Spring Framework、Spring Boot、Spring Cloud的升级是一次整体的大版本的升级涵盖了Spring Framework 5.2、Spring Boot 2.2、Spring Cloud Hoxton。
由于Spring Boot 2.2基于Spring Framework 5.2构建而Spring Cloud Hoxton又基于Spring Boot 2.2构建。所以在Spring Cloud Hoxton发布Release版本之前出现了很多Spring Boot 2.2搭配Spring Cloud Greenwich版本使用而出现各种莫名问题的情况。
现在Spring Cloud Hoxton的正式发布也预示着Spring Cloud用户可以正式开始往Spring Boot 2.2.x版本进行逐步升级。
Spring Cloud Hoxton版本内容
下面我们来关注下在Spring Cloud Hoxton版本中都提升了哪些内容。先来看看这次各依赖项目的版本升级
Spring Cloud Aws 2.2.0.RELEASESpring Cloud Vault 2.2.0.RELEASESpring Cloud Circuitbreaker 1.0.0.RELEASESpring Cloud Cli 2.2.0.RELEASESpring Cloud Gateway 2.2.0.RELEASESpring Cloud Zookeeper 2.2.0.RELEASESpring Cloud Starter Hoxton.RELEASESpring Cloud Build 2.2.0.RELEASESpring Cloud Config 2.2.0.RELEASESpring Cloud Dependencies Parent 2.2.0.RELEASESpring Cloud Starter Parent Hoxton.RELEASESpring Cloud Sleuth 2.2.0.RELEASESpring Cloud Contract 2.2.0.RELEASESpring Cloud Gcp 1.2.0.RELEASESpring Cloud Bus 2.2.0.RELEASESpring Cloud Consul 2.2.0.RELEASESpring Cloud Stream Horsham.RELEASESpring Cloud Kubernetes 1.1.0.RELEASESpring Cloud Openfeign 2.2.0.RELEASESpring Cloud Commons 2.2.0.RELEASESpring Cloud Dependencies Hoxton.RELEASESpring Cloud Task 2.2.0.RC1Spring Cloud Function 3.0.0.RELEASESpring Cloud Hoxton.RELEASESpring Cloud Netflix 2.2.0.RELEASESpring Cloud Security 2.2.0.RELEASESpring Cloud Release Hoxton.RELEASESpring Cloud Cloudfoundry 2.2.0.RELEASE
在这次的版本升级中我觉得以下几点是非常值得读者关注和学习的
新的负载均衡器实现
Spring Cloud Hoxton版本中第一次引入同时支持阻塞式与非阻塞式的负载均衡器来作为已经进入维护状态的Netflix Ribbon。
通过引入org.springframework.cloud:spring-cloud-loadbalancer依赖你就可以将新的BlockingLoadBalancerClient与RestTemplate一起使用了。
同时该依赖的引入也将支持Reactive应用跟其他使用一样只需要使用LoadBalanced来修饰WebClient.Builder即可。
新的断路器实现
该项目中定义了断路器的抽象API以及对各开源实现的整合封装其中包括
Resilience4jSpring RetryHystrix (spring-cloud-netflix)Sentinel (spring-cloud-alibaba)
加入更多Reactive支持
Spring Cloud Gateway中增加ReactiveLoadBalancer以下组件中增加ReactiveDiscoveryClient服务发现实现 Spring Cloud NetflixSpring Cloud ConsulSpring Cloud ZookeeperSpring Cloud OpenfeignSpring Cloud CloudfoundrySpring Cloud Kubernetes
相关阅读
Spring Boot 2.2.0 正式发布大幅性能提升 Java 13 支持Spring Boot 2.2.1 正式发布需特别注意这个注解的使用Spring Cloud 全面学习教程