从springBoot1.X到springboot2.X

  1. 修改版本号

Spring Cloud

Spring Boot

Finchley

兼容Spring Boot 2.0.x,不兼容Spring Boot 1.5.x

DalstonEdgware

兼容Spring Boot 1.5.x,不兼容Spring Boot 2.0.x

Camden

兼容Spring Boot 1.4.x,也兼容Spring Boot 1.5.x

Brixton

兼容Spring Boot 1.3.x,也兼容Spring Boot 1.4.x

Angel

兼容Spring Boot 1.2.x

   2.修改eureka /feign /redis /zuul 依赖为:

<!--服务提供者-->

        <dependency>

            <groupId>org.springframework.cloud</groupId>

            <artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>

        </dependency>

 

        <!-- Feign -->

        <dependency>

            <groupId>org.springframework.cloud</groupId>

            <artifactId>spring-cloud-starter-openfeign</artifactId>

        </dependency>

 

        <dependency>

            <groupId>org.springframework.boot</groupId>

            <artifactId>spring-boot-starter-data-redis</artifactId>

        </dependency>

<dependency>

           <groupId>org.springframework.cloud</groupId>

            <artifactId>spring-cloud-starter-netflix-zuul</artifactId>

        </dependency>

  3.修改redis配置

spring.redis.hostName

spring.redis.port

spring.redis.password

spring.redis.timeout

spring.redis.jedis.pool.max-active

spring.redis.jedis.pool.max-wait=-1ms

spring.redis.jedis.pool.max-idle

spring.redis.jedis.pool.min-idle

4. 修改网关路由配置方式

zuul.routes.sso.serviceId----服务/应用名称

zuul.routes.sso.stripPrefix---  转发时带上前缀(项目名),默认脱离前缀转发  

zuul.routes.sso.path---- 应用访问路径前缀 格式:/itsm/system/sso/**

 5.修改配置项server.context-path

 2.X版本是server.servlet.context-path

 6.WebMvcConfigurerConfigure方法已过期,改为implements WebMvcConfigurer,都是默认实现

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值