2019.01.23 期待已久的Spring Cloud Greenwich 发布了release版本,作为我们团队也第一时间把RC版本替换为release,以下为总结,希望对你使用Spring Cloud Greenwich 有所帮助 Greenwich 只支持 Spring Boot 2.1.x 分支。如果使用 2.0.x 请使用Finchley版本,
  
  pom坐标
  
  主要是适配JAVA11
  
  <!--支持Spring Boot 2.1.X-->
  
  <dependency>
  
  <groupId>org.springframework.boot</groupId>
  
  <artifactId>spring-boot-dependencies</artifactId>
  
  <version>2.1.2.RELEASE</version>
  
  <type>pom</type>
  
  <scope>import</scope>
  
  </dependency>
  
  <!--Greenwich.RELEASE-->
  
  <dependency>
  
  <groupId>org.springframework.cloud</groupId>
  
  <artifactId>spring-cloud-dependencies< www.ysyl157.com /artifactId>
  
  <version>Greenwich.RELEASE</version>
  
  <type>pom</type>
  
  <scope>import</scope>
  
  </dependency>
  
  升级netflix版本,DiscoveryClient支持获取InstanceId
  
  image
  
  Spring Cloud Config 提供了新的存储介质
  
  除了Git、File、JDBC,新版本提供 在Cloud Foundry的CredHub存储功能
  
  spring:
  
  profiles:
  
  active: credhub
  
  cloud:
  
  config:
  
  server:
  
  credhub:
  
  url: https://credhub:8844
  
  Spring Cloud Gateway
  
  支持整合OAuth2
  
  这里提供了一个例子: Spring Cloud Gateway and Spring Security OAuth2
  
  整合的时候有个坑可以参考这个issue:ReactiveManagementWebSecurityAutoConfiguration Prevent's oauth2Login from being defaulted
  
  新增重写响应头过滤器
  
  spring:
  
  cloud:
  
  gateway:
  
  routes:
  
  - id: rewriteresponseheader_route
  
  uri: http://www.hengda157.com example.org
  
  filters:
  
  - RewriteResponseHeader=X-Response-Foo,www.dasheng178.com , password=[^&]+, password=***
  
  Feign 的新特性和坑
  
  @SpringQueryMap 对Get请求进行了增强
  
  终于解决这个问题了
  
  不用直接使用OpenFeign新增的@QueryMap,由于缺少value属性 QueryMap注释与Spring不兼容...
  
  异常解决
  
  对Spring Cloud Finchley 进行直接升级时候发现feign启动报错了
  
  ***************************
  
  APPLICATION FAILED TO START
  
  ***************************
  
  Description:
  
  The bean 'pigx-upms-biz.FeignClientSpecification', defined in null, could not be registered. A bean with that name has already been defined in null and www.wanchuang2.com overriding is disabled.
  
  Action:
  
  Consider renaming one of the beans or enabling overriding by setting spring.main.www.lezongyule.com allow-bean-definition-overriding=true
  
  Process finished with exit code 1
  
  第一种粗暴的解决方法,异常日志中说明了,在 bootstrap.yml中配置
  
  spring.main.allow-bean-definition-overriding=true
  
  这是Spring Boot 2.1 后新增的属性运行bean 覆盖,不要配置到配置中心里面,不然无效
  
  第二种,就是把通过同一个服务调用的代码,移动到同一个@FeignClient中
  
  contextId ,这个是@FeignClient 新增的一个属性
  
  This will be used as the bean name instead of name if present, but will not be used as a service id.
  
  就可以用这个属性区分@FeigenClient 标志的同一个service 的接口
  
  总结
  
  Spring Cloud F -- > G 变化很小,微乎其微主要是JAVA11的兼容
  
  很遗憾没有看到 Spring Cloud Alibaba 加油。
  
  Spring Cloud LoadBalancer 还是老样子。目前来看暂时无法替代 ribbon
  

Spring Cloud Greenwich 新特性和F升级分享的更多相关文章

  1. 【Finchley】【新特性】Spring Cloud Finchley 新特性

    Finchley 正式版的发布貌似经历了相当长的时间,这次的重大发布主要带来了以下 4 项重大更新. 重大更新 1.新增 Spring Cloud Gateway 组件 Spring Cloud Ga ...

  2. Spring Cloud Greenwich 正式发布,Hystrix 即将寿终正寝。。

    Spring Cloud Greenwich 正式版在 01/23/2019 这天正式发布了,下面我们来看下有哪些更新内容. 生命周期终止提醒 Spring Cloud Edgware Edgware ...

  3. Spring Cloud Greenwich.SR4 发布了,跟不上了……

    前几天 Spring Cloud Greenwich.SR4 发布了: https://spring.io/blog/2019/11/19/spring-cloud-greenwich-sr4-rel ...

  4. 我这样回答了Spring 5的新特性,面试官对我刮目相看

    最近,有一个小伙伴拿到了自己满意的Offer,和他交谈的过程中得知他面试官问他关于Spring的问题比较多,其中最让面试官满意的就是自己回答关于Spring 5的知识点回答的不错. Spring5于2 ...

  5. Spring cloud Greenwich Eureka

    1.父工程POM文件中: <dependencyManagement> <dependencies> <!--spring cloud--> <depende ...

  6. 关于Spring Cloud的核心特性

    SOA和微服务的区别 其实服务化架构已经可以解决大部分企业的需求了,那么我们为什么要研究微服务呢?先说说它们的区别: 微服务架构强调业务系统需要彻底的组件化和服务化,一个组件就是一个产品,可以独立对外 ...

  7. 1. Spring Cloud Greenwich SR2 概览

    Spring Cloud provides tools for developers to quickly build some of the common patterns in distribut ...

  8. Exadata 18.1新特性--计算节点升级增强

    新的计算节点升级增强能大幅缩短升级花费的时间,最快能减少40%的时间,具体的增强主要体现在以下方面: 1.计算节点操作系统的备份工作. 以前计算节点操作系统的备份工作是在正式升级之前执行,在滚动升级过 ...

  9. Spring 3.1新特性之三:Spring对声明式缓存的支持

    一.概述: Spring 3.1 引入了激动人心的基于注释(annotation)的缓存(cache)技术,它本质上不是一个具体的缓存实现方案(例如EHCache 或者 OSCache),而是一个对缓 ...

随机推荐

  1. hdu2187悼念512汶川大地震遇难同胞——老人是真饿了(贪心 简单题)

    传送门 简单题 #include<bits/stdc++.h> using namespace std; struct node { double dan,weight; }a[]; bo ...

  2. linux命令提示符设置

    变成绿色 [root@localhost /usr/local]#vim /root/.bashrc # .bashrc # User specific aliases and functions a ...

  3. No.03---Vue学习之路之模块化组织

    前两篇讲解了一下 Vuex 的基本使用方法,可是在实际项目中那么写肯定是不合理的,如果组件太多,不可能把所有组件的数据都放到一个 store.js 中的,所以就需要模块化的组织 Vuex,首先看一下 ...

  4. HTTP协议请求信息详解

    通常HTTP消息包括客户机向服务器的请求消息和服务器向客户机的响应消息.客户端向服务器发送一个请求,请求头包含请求的方法.URI.协议版本.以及包含请求修饰符.客户信息和内容的类似于MIME的消息结构 ...

  5. html的背景样式图片

    背景图片 如果背景图片小于当前的div的情况下 默认的是将平铺充满元素 background-image 设置背景图片. background-repeat 设置是否及如何重复背景图片. repeat ...

  6. website for personal research

    YOLO https://pjreddie.com/darknet/yolo/ Low Rank Matrix Recovery and Completion via Convex Optimizat ...

  7. leetcode个人题解——#43 Multiply Strings

    思路:高精度乘法就可以了. 有两个错误以前没在意,1.成员属性定义时候不能进行初始化, vector<); 这样隐性调用了函数进行初始化的形式特别要注意,也是错误的: 2.容器类只有分配了空间时 ...

  8. zend安装及破解

    Zend下载 https://pan.baidu.com/s/1fCfUQ0j7dxEtOzbNnsgODg 破解: 1.打开dmg文件安装,将Zend Studio拖拽至applications进行 ...

  9. 第九章 Mysql函数

    简介 数学函数:处理数字 字符串函数:处理字符串 日期和时间函数:处理日期和时间,获取时间 条件判断函数:控制条件选择 系统信息函数:获取MySQL系统信息,包括数据库名称,当前用户名和数据库版本 加 ...

  10. weblogic下JNDI及JDBC连接测试(weblogic环境)

    JNDI的专业解释,大家自行去网络搜索吧,这里就不啰嗦了. 单纯从使用角度看,可以简称把它看成一个key-value的“哈希资源”容器.给定一个string类型的key,可以把任何类型的value,放 ...