首页天道酬勤springcloud最新版本,spring cloud框架

springcloud最新版本,spring cloud框架

张世龙 05-06 05:45 58次浏览

第一次学习吉利spring cloud的朋友可能不知道,其实SpringBoot需要和spring cloud对应版本。 否则,eureka注册的结果可能会导致找不到服务类、某些jar无法导入,以及许多意外错误。 以下是springBoot和spring cloud的版本对应关系。 必须结合使用,以免发生各种奇怪的错误。

有关maven仓库的版本列表spring-cloud-dependencies版本列表,请参见:

3359 mvn repository.com/artifact/org.spring framework.cloud/spring-cloud-dependencies

spring-boot-starter-parent的版本列表如下。

3359 mvn repository.com/artifact/org.spring framework.boot/spring-boot-starter-parent

版本对应关系支持大版本:

Spring CloudSpring BootAngel版本为Spring Boot 1.2.xBrixton版本为Spring Boot 1.3.x和Spring Boot 1.4.xCamden版本为Spring Boot 1.4.x Spring Boot 1.5.xDalston版本,Edgware版本与Spring Boot 1.5.x兼容,Spring Boot 2.0.xFinchley版本与Spring Boot 2.0.x兼容, 与Spring Boot 1.5.xGreenwich不兼容的版本与Spring Boot 2.1.xHoxtonl兼容的版本Spring Boot 2.2.x实际开发需要更详细的版本支持。

springbootspringcloud1.5.2. released Alston.RC 11.5.9.releaseedgware.release2.0.2. release finchley.build - spring cloud1.x版本和2.x版本区分spring cloud的各个版本之间有区别。 例如,springcloud例如有被称为spirng-cloud-starter-hystrix的,也有被称为spring-cloud-netflix-hystrix的,维护困难

1.x版pom.xml中基本使用的几个jar长度是这样的。

project xmlns=' http://maven.Apache.org/POM/4.0.0 ' xmlns : xsi=' http://www.w3.org/2001/XML方案ins ttins maven-4.0.0.xsd ' model版本4.0.0/modelversiongroupidcom.joom artifactidversion 1.0/versionpackagingjar/pars groupidartifactidspring-boot artifactidversion1.5.9. release/versionrelativepath//parentdependencymanagementdependenciesdependencygroupidorg.sppendency groupidartifactidspring-cloud-dependencies/artifatifal

<scope>import</scope> </dependency> </dependencies> </dependencyManagement> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-feign</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-hystrix</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-zipkin</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-eureka</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <exclusions> <!-- 排除spring boot默认使用的tomcat,使用jetty --> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jetty</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-ribbon</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> </dependencies></project>

而在2.x版本中,比如我们需要eureka,去maven仓库中可能会看到deprecated, please use spring-cloud-starter-netflix-eureka-client这类提示,包括使用ribbon也会有


所以个人猜测2.x中统一用
spring-cloud-starter-netflix-xx 替换了原有的 spring-cloud-starter-xx(此处如有不正确请指出)
所以2.x的版本pom.xml类似如下这样

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.forezp</groupId> <artifactId>service-feign</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>service-feign</name> <description>Demo project for Spring Boot</description> <parent> <groupId>com.forezp</groupId> <artifactId>sc-f-chapter3</artifactId> <version>0.0.1-SNAPSHOT</version> </parent> <dependencies> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-openfeign</artifactId> </dependency> </dependencies> </project>
Springboot项目,springboot cloud