current position:Home>Precautions when applying to upgrade springcloud Version (Dalston to Edgware)

Precautions when applying to upgrade springcloud Version (Dalston to Edgware)

2022-06-24 09:35:07InfoQ

Welcome to visit mine GitHub

Here we classify and summarize all the original works of Xinchen ( Including supporting source code ):
https://github.com/zq2599/blog_demos

  • There's a Spring Cloud The engineering of , Is the identity of the service provider , stay pom.xml Configured in Spring Cloud The version is
    Dalston.SR5
    , To upgrade to
    Edgware.RELEASE
    , There is a dependency package change that needs attention ;

Configuration before upgrade

  • pom.xml neutralization Spring Cloud The related configuration is shown in the figure below , Current version in red box , The green box is related to service registration starter rely on :

null

upgrade Spring Cloud edition

  • First step : Change version number to
    Edgware.RELEASE
    Here's the picture :

null
  • The second step : Will depend on the
    spring-cloud-starter-eureka
    Change it to
    spring-cloud-starter-netflix-eureka-client
    , Here's the picture :

null

Why use spring-cloud-starter-netflix-eureka-client?

  • use spring-cloud-starter-netflix-eureka-client replace spring-cloud-starter-eureka Why , From the following information :
  • Maven The central warehouse , The address is :https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-eureka-server , It says spring-cloud-starter-eureka-server Has been abandoned , It is recommended to use spring-cloud-starter-netflix-eureka-server, Here's the picture :

null
  • Dalston.SR5 Version of Spring Cloud, Corresponding spring-cloud-netflix Kuo is 1.3.6.RELEASE edition , We are advised to use the spring-cloud-starter-eureka, Document address :https://cloud.spring.io/spring-cloud-static/spring-cloud-netflix/1.3.6.RELEASE/multi/multi__service_discovery_eureka_clients.html#netflix-eureka-client-starter , Here's the picture :

null
  • Edgware.RELEASE Version of Spring Cloud, Corresponding spring-cloud-netflix Kuo is 1.4.0.RELEASE edition , We are advised to use the spring-cloud-starter-netflix-eureka-client, Document address :https://cloud.spring.io/spring-cloud-netflix/1.4.x/multi/multi__service_discovery_eureka_clients.html , Here's the picture :

null
  • In order to have a more intuitive understanding , Let's take a look at the official example spring-cloud-samples/customers-stores, Some of them are from Dalston.BUILD-SNAPSHOT Upgrade to Finchley.SR1 Modification record , The address is :https://github.com/spring-cloud-samples/customers-stores/commit/79f736fcc13562c14464a4b2b0025d3006c316ad , As shown in the figure below , Red box means delete line , Green box for new line :

null
  • The most comprehensive information comes from the official version , The address is :https://github.com/spring-projects/spring-cloud/wiki/Spring-Cloud-Edgware-Release-Notes , Other dependent modules to be modified ID It's all in the list , Here's the picture :

null
  • Summary : Official documents and demo The most reliable source of information , When upgrade operation is involved , It's better to list the key items , Go to the official documents to confirm ;

Welcome to your attention InfoQ: Xinchen, programmer

On the way to study , You are not alone , Xinchen's original works are accompanied all the way ...

copyright notice
author[InfoQ],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2022/175/202206240810494854.html

Random recommended