一、SpringBoot与SpringCloud版本映射
最新的映射版本(截止2024-12-07):
SpringBoot3.4.0和Spring Cloud 2024.0(Spring Cloud Openfeign 4.2.0)
Adding Spring Cloud To An Existing Spring Boot Application
If you an existing Spring Boot app you want to add Spring Cloud to that app, the first step is to determine the version of Spring Cloud you should use. The version you use in your app will depend on the version of Spring Boot you are using.
The table below outlines which version of Spring Cloud maps to which version of Spring Boot.
Table 1. Release train Spring Boot compatibility (see here for more detailed information).
将Spring Cloud添加到现有 Spring Boot 应用程序。
如果您有一个现有的 Spring Boot 应用程序,您希望将Spring Cloud添加到该应用程序中,第一步是确定您应该使用的Spring Cloud版本。您在应用中使用的版本将取决于您使用的 Spring Boot 版本。
下表概述了哪个版本的Spring Cloud映射到哪个版本的 Spring Boot 。
二、Spring Cloud BOM
Now that you know which release train to use and the latest service release for that release train you are ready to add the Spring Cloud BOM to your application.
现在您已经知道要使用哪个发布系列以及该发布系列的最新服务版本,您可以准备将Spring Cloud BOM添加到应用程序中。
<properties>
<spring-cloud.version>2024.0.0</spring-cloud.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
Just like Spring Boot, many Spring Cloud projects include starters that you can add as dependencies to add various cloud native features to your project. In many cases, many features are enabled purely by adding the starter to your classpath. The starter names are documented within the individual projects. Below is an example of how you would add a Spring Cloud Config Client and a Spring Cloud Netflix Eureka client to your application.
就像 Spring Boot 一样,许多Spring Cloud项目都包含启动器,您可以将其作为依赖项添加,以向项目添加各种云原生功能。在许多情况下,许多功能都是通过将启动器添加到类路径中来启用的。启动器名称记录在各个项目中。下面是如何将Spring Cloud Config Client和Spring Cloud Netflix尤里卡客户端添加到应用程序的示例。
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
...
</dependencies>
三、Spring Cloud 2024.0 Release Notes
Spring Cloud 2024.0 Release Notes
spring-cloud
spring-cloud-openfeign
四、Spring Cloud 官方文档
https://spring.io/projects/spring-cloud