开始

SpringBoot与SpringCloud需要版本对应,否则可能会造成很多意料之外的错误,比如eureka注册了结果找不到服务类啊,比如某些jar导入不进来啊,等等这些错误。下面列出来springBoot和spring cloud的版本对应关系,需要配套使用,才不会出现各种奇怪的错误。

官方查询地址

Spring 官方对应版本地址: (https://start.spring.io/actuator/info),格式化后更好看!!

版本对应关系

大版本对应

Spring CloudSpring Boot
Angel版本兼容Spring Boot 1.2.x
Brixton版本兼容Spring Boot 1.3.x,也兼容Spring Boot 1.4.x
Camden版本兼容Spring Boot 1.4.x,也兼容Spring Boot 1.5.x
Dalston版本、Edgware版本兼容Spring Boot 1.5.x,不兼容Spring Boot 2.0.x
Finchley版本兼容Spring Boot 2.0.x,不兼容Spring Boot 1.5.x
Greenwich版本兼容Spring Boot 2.1.x,不兼容Spring Boot 2.0.x
Hoxtonl版本兼容Spring Boot 2.2.x

详细的版本对应

Spring CloudSpring Boot
Dalston.RC11.5.2.RELEASE
Finchley.M92.0.0.RELEASE
Finchley.RC12.0.1.RELEASE
Finchley.RC22.0.2.RELEASE
Finchley.SR42.0.3.RELEASE~~~2.0.999.RELEASE
Greenwich.SR52.1.0.RELEASE~~~2.1.14.RELEASE
Hoxton.SR42.2.0.M4
	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.1.3.RELEASE</version>
	</parent>
	<!-- 管理依赖 SpringBoot与SpringCloud的版本对应管理-->
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.springframework.cloud</groupId>
				<artifactId>spring-cloud-dependencies</artifactId>
				<version>Greenwich.SR5</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>
	<!-- 注意: 这里必须要添加, 否者各种依赖有问题 -->
	<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>