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

SpringBoot项目pom.xml中WebFlux依赖无法找到的问题求助

解决Maven找不到Spring Boot 3.4.0-RC1 WebFlux依赖的问题

问题根源:3.4.0-RC1是预发布候选版本(Release Candidate),这类版本不会上传到Maven中央仓库,仅存放在Spring官方的预发布仓库中,所以默认配置下Maven无法检索到。

解决步骤:

  • 在项目的pom.xml中添加Spring里程碑仓库配置,放在<project>标签内:
<repositories>
    <repository>
        <id>spring-milestones</id>
        <name>Spring Milestones</name>
        <url>https://repo.spring.io/milestone</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
</repositories>

<!-- 如果需要用到Spring Boot的预发布插件,再添加以下配置 -->
<pluginRepositories>
    <pluginRepository>
        <id>spring-milestones</id>
        <name>Spring Milestones</name>
        <url>https://repo.spring.io/milestone</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </pluginRepository>
</pluginRepositories>
  • 执行Maven强制更新命令,清除本地缓存的失败记录:
    mvn clean install -U
  • 在IntelliJ中重新加载Maven项目(点击右侧Maven面板的「Reload Project」按钮)

可选方案:如果不是必须使用RC版本,建议改用Spring Boot的稳定发布版本(比如3.3.x系列),这类版本直接在Maven中央仓库可获取,无需额外配置仓库。

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.16 05:43:15