老项目:

SpringBoot 版本 :1.5.13.RELEASE

SpringCloud 版本:Dalston.SR5

项目升级:

SpringBoot 版本 :2.1.6.RELEASE

SpringCloud 版本:Greenwich.SR2

武器:

https://mvnrepository.com/

https://start.spring.io/

有些依赖发生了变化,记录一下:

org.springframework.cloud:spring-cloud-starter-feign --> org.springframework.cloud:spring-cloud-starter-openfeign

org.springframework.cloud:spring-cloud-starter-eureka-server --> org.springframework.cloud:spring-cloud-starter-netflix-eureka-server

HikariCP --> org.springframework.boot:spring-boot-starter-jdbc   https://www.jb51.net/article/157642.htm

org.springframework.cloud:spring-cloud-starter-hystrix-dashboard --> org.springframework.cloud:spring-cloud-starter-netflix-hystrix-dashboard

org.springframework.cloud:spring-cloud-starter-hystrix -->  org.springframework.cloud:spring-cloud-starter-netflix-hystrix

org.springframework.cloud:spring-cloud-starter-turbine --> org.springframework.cloud:spring-cloud-starter-netflix-turbine

mysql:mysql-connector-java 不用加版本号

org.mybatis.spring.boot:mybatis-spring-boot-starter:2.0.1

spring boot 2 把jar{}变成bootJar{}了

compile group: 'com.esotericsoftware', name: 'kryo', version: '4.0.2' 对象序列化使用kryo

compile group: 'de.javakaffee', name: 'kryo-serializers', version: '0.45' 这个加上可以让kryo序列化集合,否则的话对集合进行序列化的时候会抛出异常

compile group: 'net.spy', name: 'spymemcached', version: '2.11.7' memcached缓存包

这个异常还是由于集合序列化失败。。。

解决方案:

1)compile group: 'de.javakaffee', name: 'kryo-serializers', version: '0.45' 加这个,然而还是抛异常

2)修改key值,因为缓存里的老数据仍然是不能序列化的,然而还是抛异常

3)kryo初始化的时候 添加 UnmodifiableCollectionsSerializer https://www.programcreek.com/java-api-examples/?api=de.javakaffee.kryoserializers.UnmodifiableCollectionsSerializer 然而还是抛异常

4)最后 放弃使用kryo了。。。直接使用 Serializable

解决:

com.fasterxml.jackson.databind.JsonNode; 换成  com.alibaba.fastjson.JSONObject;

springCloud——Dalston.SR5升级到Greenwich.SR2的更多相关文章

  1. Spring Cloud Dalston.SR5 BUG一记

    使用Dalston.SR5版本的Zuul时, 发现Ribbon重试不能切换服务实例, 换成Edgware.SR3,同样的配置可以切换实例进行重试 还有个不升级所有Spring Cloud组件的方法,仅 ...

  2. Spring Cloud(Dalston.SR5)--Config 集群配置中心-刷新配置

    远程 SVN 服务器上面的配置修改后,需要通知客户端来改变配置,需要增加 spring-boot-starter-actuator 依赖并将 management.security.enabled 设 ...

  3. Spring Cloud(Dalston.SR5)--Config 集群配置中心

    Spring Cloud Config 是一个全新的项目,用来为分布式系统中的基础设施和微服务应用提供集中化的外部配置支持,他分为服务端和客户端两个部分.服务端也称为分布式配置中心,是一个独立的微服务 ...

  4. Spring Cloud(Dalston.SR5)--Zuul 网关-微服务集群

    通过 url 映射的方式来实现 zuul 的转发有局限性,比如每增加一个服务就需要配置一条内容,另外后端的服务如果是动态来提供,就不能采用这种方案来配置了.实际上在实现微服务架构时,服务名与服务实例地 ...

  5. Spring Cloud(Dalston.SR5)--Hystrix 监控

    在服务调用者加入 Actuator ,可以对服务调用者的健康情况进行实时监控,例如,断路器是否打开.当前负载情况等. 服务调用者 需要增加 actuator依赖, 修改 POM.xml 中增加以下依赖 ...

  6. Spring Cloud(Dalston.SR5)--Feign 与 Hystrix 断路器整合

    创建项目 要使 Feign 与 Hystrix 进行整合,我们需要增加 Feign 和 Hystrix 的依赖,修改 POM.xml 中增加以下依赖项如下: <?xmlversion=" ...

  7. Spring Cloud(Dalston.SR5)--Hystrix 断路器

    Spring Cloud 对 Hystrix 进行了封装,使用 Hystrix 是通过 @HystrixCommand 注解来使用的,被 @HystrixCommand 注解标注的方法,会使用 Asp ...

  8. Spring Cloud(Dalston.SR5)--Feign 声明式REST客户端

    Spring Cloud 对 Feign 进行了封装,集成了 Ribbon 并结合 Eureka 可以实现客户端的负载均衡,Spring Cloud 实现的 Feign 客户端类名为 LoadBala ...

  9. Spring Cloud(Dalston.SR5)--Ribbon 中间层负载均衡

    Spring Cloud 集成了 Ribbon 并结合 Eureka 可以实现客户端的负载均衡,使用 @LoadBalanced 修饰的 RestTemplate 类拥有了负载均衡功能,在 Sprin ...

随机推荐

  1. FPGA VGA时序的理解

    最近在做FPGA毕业设计,毕业设计规划的是摄像头采集图像,经过均值滤波,中值滤波,高斯滤波,然后通过VGA接口控制显示器显示出来,所以最近学习了一下FPGA的VGA驱动的相关内容. VGA接口 如上图 ...

  2. Java中volatile关键字的最全总结

    转载至:https://blog.csdn.net/u012723673/article/details/80682208 关于volatile很重要的一点: 它保证了可见性,即其他线程对volati ...

  3. vue --》路由query 编程式导航传值与监听

    1.首先在一个页面设置一个按钮,用于路由跳转 <template> <div> <button @click="handleToRouter"> ...

  4. mysql——多表——内连接查询

    内连接查询:可以查询两个或者两个以上的表,当两个表中存在表示相同意义的字段时,可以通过该字段来连接这两个表: 当该字段的值相等时,就查询出该记录. 前期准备两个表: ), d_id ), name ) ...

  5. Studio 3T 破解教程

    亲测可用 ,且小编一直在使用 1.创建文件studio3t.bat 并将下面这段内容复制 @echo off ECHO 重置Studio 3T的使用日期...... FOR /f "toke ...

  6. 2019JAVA第八次实验报告

    班级 计科二班 学号 20188442 姓名 吴怡君 完成时间 2019.11.1 评分等级 课程作业: 将奇数位小写字母改写为大写字母(用文件输出) 实验代码: package Domon7; im ...

  7. Node.js使用redis进行订阅发布管理

    redis NPM 官方介绍地址:https://www.npmjs.com/package/redis let redis = require('redis'); let subscriber; l ...

  8. 死磕并发之CountDownLatch解析

    CountDownLatch解析 CountDownLatch是什么 CountDownLatch是基于AQS的阻塞工具,阻塞一个或者多个线程,直到所有的线程都执行完成. CountDownLatch ...

  9. import和from.…import…

    import和from.-import- 在讲之前我们先来讲一下怎样去下载第三方库,我们把python看作一部手机,pip就是应用管家,第三方库里面的模块就是应用管家里面的一个应用 一.import模 ...

  10. 05.AutoMapper 之配置验证(Configuration Validation)

    https://www.jianshu.com/p/5901a5d1ef15 配置验证(Configuration Validation) 手写映射配置代码虽然繁琐,但具有可测试的优点.AutoMap ...