You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Spring Boot 2.7.11兼容的Spring Cloud及服务版本咨询

Spring Boot 2.7.11 兼容的 Spring Cloud 及 Spring Cloud Services 版本

你遇到的启动错误是由于Spring Boot与Spring Cloud组件版本不匹配,导致org.springframework.cloud.bootstrap.BootstrapApplicationListener和org.springframework.boot.builder.SpringApplicationBuilder类出现兼容性冲突。

针对Spring Boot 2.7.11,对应的正确版本号如下:

  • spring-cloud.version: 2021.0.8(Jubilee SR8)
  • spring-cloud-services.version: 3.5.8

将你的pom.xml properties部分修改为:

<properties>
    <java.version>1.8</java.version>
    <spring-cloud-services.version>3.5.8</spring-cloud-services.version>
    <spring-cloud.version>2021.0.8</spring-cloud.version>
</properties>

同时,务必在pom.xml中添加Spring Cloud的依赖管理,保证所有子依赖版本统一:

<dependencyManagement>
    <dependencies>
        <!-- Spring Cloud 依赖管理 -->
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>${spring-cloud.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
        <!-- Spring Cloud Services 依赖管理 -->
        <dependency>
            <groupId>io.pivotal.spring.cloud</groupId>
            <artifactId>spring-cloud-services-dependencies</artifactId>
            <version>${spring-cloud-services.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

完成上述配置后,重新构建并启动应用,类路径冲突问题即可解决。

内容的提问来源于stack exchange,提问作者Luke

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.24 15:22:37