Mapping Spring Cloud to Spring Boot
The official Spring Cloud project page provides a compatibility overview, but specific version mappings are often buried in the documentation. To find the exact Spring Boot version required by a specific Spring Cloud release:
- Navigate to the Spring Cloud documentation archive.
- Select the specific release trainn (e.g.,
Hoxton.SR12). - Access the reference manual for that version.
- Locate the "Getting Started" or dependency management section, which explicitly lists the compatible Spring Boot version range.
If a specific version page is not loading, the URL structure for Spring Cloud documentation is predictable. You can manually modify the URL path to switch between versions (e.g., changing /Hoxton.SR4/ to /Hoxton.SR6/ in the address bar).
Alternatively, enspect the spring-cloud-dependencies POM file on repository sites like Maven Central. The parent POM declaration within that file reveals the tested Spring Boot version.
Mapping Spring Cloud Alibaba to the Stack
Spring Cloud Alibaba maintains its own versioning scheme that must align with both the Spring Cloud release train and Spring Boot.
- Visit the Spring Cloud Alibaba GitHub Wiki.
- Locate the "Version Instructions" page.
- Refer to the compatibility table provided by Alibaba. This table lists which version of
spring-cloud-alibaba-dependenciesworks with specific versions of Spring Cloud and Spring Boot.
It is highly recommended to use Release (RELEASE) versions rather than snapshots or milestones for production environments to ensure stability. Generally, Spring Boot 2.x is the standard for modern applications, as older 1.x versions are largely unsupported.
Example Dependency Configuration
Below is a refactored BOM (Bill of Materials) configuration. This uses a release profile and different property names to manage the stack versions.
<profiles>
<profile>
<id>release</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<!-- Core Framework Versions -->
<boot.version>2.3.0.RELEASE</boot.version>
<cloud.release.train>Hoxton.SR3</cloud.release.train>
<alibaba.stack.version>2.2.1.RELEASE</alibaba.stack.version>
<!-- Component Versions -->
<nacos.config.client>1.2.1</nacos.config.client>
<admin.server.ui>2.3.0</admin.server.ui>
</properties>
</profile>
</profiles>
<dependencyManagement>
<dependencies>
<!-- Import Spring Cloud Release Train -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${cloud.release.train}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- Import Spring Cloud Alibaba Dependencies -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
<version>${alibaba.stack.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- Spring Boot Admin Server -->
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-server</artifactId>
<version>${admin.server.ui}</version>
</dependency>
</dependencies>
</dependencyManagement>