feat: 引入swagger ui.
This commit is contained in:
9
pom.xml
9
pom.xml
@@ -22,6 +22,8 @@
|
||||
<mybatis-plus.version>3.5.12</mybatis-plus.version>
|
||||
<!-- freemarker 版本 -->
|
||||
<freemarker.version>2.3.34</freemarker.version>
|
||||
<!-- webmvc-ui 版本 -->
|
||||
<webmvc-ui.version>2.8.9</webmvc-ui.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -86,6 +88,13 @@
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- 接口文档生成 -->
|
||||
<dependency>
|
||||
<groupId>org.springdoc</groupId>
|
||||
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
|
||||
<version>${webmvc-ui.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- lombok 代码生成: getter、setter等 -->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
|
||||
@@ -5,3 +5,15 @@ spring:
|
||||
url: jdbc:mysql://localhost:3306/personal_blog?autoReconnect=true&characterEncoding=utf8
|
||||
username: root
|
||||
# password: password, # 密码不建议写在配置文件中, 建议利用Idea中的配置覆盖, 如果是其他IDE请自行斟酌
|
||||
# 接口文档生成相关配置
|
||||
springdoc:
|
||||
swagger-ui:
|
||||
path: /api.html
|
||||
tags-sorter: alpha
|
||||
operations-sorter: alpha
|
||||
# 是否启用swagger-ui
|
||||
enabled: true
|
||||
api-docs:
|
||||
path: /v1/api-docs
|
||||
# 是否启用api文档模板, 关闭后无法使用快速导入api文档
|
||||
enabled: true
|
||||
Reference in New Issue
Block a user