Springboot3 整合swagger
一、pom.xml
<dependency><groupId>org.springdoc</groupId><artifactId>springdoc-openapi-starter-webmvc-api</artifactId><version>2.1.0</version></dependency>
二、application.yml
# ===== SpringDoc配置 =====#
springdoc:swagger-ui:enabled: trueapi-docs:# enabled the /v3/api-docs endpointenabled: true
三、鉴权放开接口
.excludePathPatterns("/v3/api-docs")
四、控制器,实体类标记与备注
controller中
实体类
五、apifox中导入文档
完活