From b84401e8a4babaf4ba3e575b8d17264a2fc4dbf2 Mon Sep 17 00:00:00 2001
From: SerLiunx <17689543@qq.com>
Date: Sat, 9 Aug 2025 01:00:58 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E5=BC=95=E5=85=A5swagger=20ui.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pom.xml | 9 +++++++++
src/main/resources/application-dev.yml | 14 +++++++++++++-
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 44c3e15..5f9caf0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,6 +22,8 @@
3.5.12
2.3.34
+
+ 2.8.9
@@ -86,6 +88,13 @@
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-ui
+ ${webmvc-ui.version}
+
+
org.projectlombok
diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml
index 7743742..73ca6a8 100644
--- a/src/main/resources/application-dev.yml
+++ b/src/main/resources/application-dev.yml
@@ -4,4 +4,16 @@ spring:
datasource:
url: jdbc:mysql://localhost:3306/personal_blog?autoReconnect=true&characterEncoding=utf8
username: root
-# password: password, # 密码不建议写在配置文件中, 建议利用Idea中的配置覆盖, 如果是其他IDE请自行斟酌
\ No newline at end of file
+# 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
\ No newline at end of file