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

Spring Boot 3.2.2集成OpenApi Swagger V3启动失败求助

问题解决:Spring Boot 3.2.2集成SpringDoc OpenAPI启动失败

问题原因

你遇到的UnsatisfiedDependencyException是因为Spring Boot 3.2.2与springdoc-openapi-starter-webmvc-ui 2.3.0版本不兼容——该版本的springdoc内部依赖的类(注:你提到的AbstruceRequestService应为拼写错误,实际是AbstractRequestService)在Spring Boot 3.2.x环境下无法被正确自动装配。

解决方案

将springdoc依赖版本升级到2.4.0及以上,该版本已适配Spring Boot 3.2.x系列。修改后的依赖如下:

<dependency>
    <groupId>org.springdoc</groupId>
    <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
    <version>2.4.0</version>
</dependency>

额外验证步骤

  • 清理项目依赖缓存(比如执行Maven命令mvn clean install或Gradle命令clean build),避免旧版本依赖残留
  • 确保项目中未引入其他冲突的SpringDoc/Swagger相关依赖,比如旧版springdoc-openapi-ui或springfox系列依赖

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.29 12:42:02