chore(deps): Swagger springfox → Springdoc OpenAPI 1.8.0
迁移内容: - 移除 springfox-boot-starter:3.0.0 (已停维, 与 Spring Boot 2.7 不兼容) - 新增 springdoc-openapi-ui:1.8.0 (OpenAPI 3.0, 兼容 Spring Boot 2.7) - 重写 SwaggerConfig.java → 使用 OpenAPI bean + SecurityScheme - 移除 ResourcesConfig 中 springfox-swagger-ui 资源映射 - 移除 ISchedulePoolService 中未使用的 io.swagger.models.auth.In import - application.yml: springfox 配置 → springdoc 配置 验证结果: - ✅ Swagger UI 页面 HTTP 200 - ✅ OpenAPI JSON 正常 (1373 个 API) - ✅ 登录/分页/路由接口正常 - ✅ 71 个 @ApiOperation 注解兼容无需修改
This commit is contained in:
@@ -110,17 +110,15 @@ pagehelper:
|
||||
# 默认值为 false。设置为 true 时,允许在运行时根据多数据源自动识别对应方言的分页
|
||||
auto-runtime-dialect: true
|
||||
|
||||
# Swagger配置
|
||||
# 禁用 Springfox (与 Spring Boot 2.7 不兼容, 后续迁移至 springdoc)
|
||||
springfox:
|
||||
documentation:
|
||||
enabled: false
|
||||
|
||||
swagger:
|
||||
# 是否开启swagger
|
||||
enabled: true
|
||||
# 请求前缀
|
||||
pathMapping: /dev-api
|
||||
# Springdoc OpenAPI 配置 (替代 Springfox)
|
||||
springdoc:
|
||||
api-docs:
|
||||
enabled: true
|
||||
swagger-ui:
|
||||
enabled: true
|
||||
tags-sorter: alpha
|
||||
operations-sorter: alpha
|
||||
packages-to-scan: com.core.web,com.openhis.web
|
||||
|
||||
# 防止XSS攻击
|
||||
xss:
|
||||
|
||||
Reference in New Issue
Block a user