新增:新增接口文档配置(基于 Spring Doc OpenAPI,使用 Knife4j 作为增强解决方案)

This commit is contained in:
2022-12-11 21:56:18 +08:00
parent 1e5eaab9d3
commit 79891e8b5a
13 changed files with 366 additions and 44 deletions

View File

@@ -32,4 +32,9 @@ captcha:
# 宽度
width: 111
# 高度
height: 36
height: 36
--- ### 接口文档配置
springdoc:
swagger-ui:
enabled: true

View File

@@ -32,4 +32,9 @@ captcha:
# 宽度
width: 111
# 高度
height: 36
height: 36
--- ### 接口文档配置
springdoc:
swagger-ui:
enabled: false

View File

@@ -3,9 +3,22 @@ continew-admin:
# 名称
name: ContiNew-Admin
# 应用名称
appName: @project.name@
appName: @project.parent.name@
# 版本
version: @project.version@
# 描述
description: @project.parent.description@
# URL
url: @project.parent.url@
## 作者信息配置
author:
name: Charles7c
email: charles7c@126.com
url: https://blog.charles7c.top/about/me
## 许可协议信息配置
license:
name: Apache-2.0
url: https://github.com/Charles7c/continew-admin/blob/dev/LICENSE
--- ### 日志配置(重叠部分,优先级高于 logback-spring.xml 中的配置)
logging:
@@ -15,6 +28,20 @@ logging:
path: @logging.file.path@
config: classpath:logback-spring.xml
--- ### 接口文档配置
springdoc:
swagger-ui:
path: /swagger-ui.html
tags-sorter: alpha
operations-sorter: alpha
api-docs:
enabled: ${springdoc.swagger-ui.enabled}
path: /v3/api-docs
group-configs:
- group: 'default'
paths-to-match: '/**'
packages-to-scan: top.charles7c.cnadmin.webapi
--- ### 服务器配置
server:
servlet: