关于spring cloud升级

发布 : 2018-03-16 分类 : 后端 浏览 :
  1. pom.xml必须加入:
1
2
3
4
5
6
7
8
9
10
<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/libs-milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
  1. eureka、feign、ribbon、hystrix的artifactId都变化了,变成:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
</dependency>
  1. spring boot2.0默认的Redis客户端由Jedis变为Lettuce,但依然支持Jedis,需要修改依赖为:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
<exclusions>
<exclusion>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
</dependency>
  1. pagehelper-spring-boot-starter升级为1.2.3

参考资料:http://mp.weixin.qq.com/s?__biz=MzI2ODYxMjU4MQ==&mid=2247483976&idx=1&sn=cfbc6f0ac36e7e756388d6224137a6cf&chksm=eaeda4c2dd9a2dd4254528ee0cbb0319a97edec260a607c3190a6438578e57c04213053e2b93&mpshare=1&scene=1&srcid=0314fhy4YakRPsxSuK42i1XV#rd

本文作者 : tangyi
原文链接 : http://ehedgehog.com/2018/03/16/关于spring cloud升级/
版权声明 : 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明出处!

知识 & 情怀 | 二者兼得

支付宝扫一扫, 向我投食

支付宝扫一扫, 向我投食

留下足迹