From d077350cebb5ad8787de92c74be912708797f6f8 Mon Sep 17 00:00:00 2001 From: Wonder Date: Sat, 18 Oct 2025 10:34:59 +0800 Subject: [PATCH] =?UTF-8?q?=20=F0=9F=94=A7Chore:=20=E6=B7=BB=E5=8A=A0Sprin?= =?UTF-8?q?g=20Boot=E5=9F=BA=E7=A1=80=E9=85=8D=E7=BD=AE=E5=92=8C=E4=BE=9D?= =?UTF-8?q?=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + pom.xml | 36 ++++++++++++++++++- .../java/cn/hezhaohui/thumb/Application.java | 11 ++++++ src/main/resources/application.yml | 24 +++++++++++++ src/main/resources/logback.xml | 9 +++++ 5 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 src/main/java/cn/hezhaohui/thumb/Application.java create mode 100644 src/main/resources/application.yml create mode 100644 src/main/resources/logback.xml diff --git a/.gitignore b/.gitignore index 9f11b75..e673575 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .idea/ +target/ \ No newline at end of file diff --git a/pom.xml b/pom.xml index d9a86bf..4e86c95 100644 --- a/pom.xml +++ b/pom.xml @@ -13,8 +13,42 @@ 21 - + + org.springframework.boot + spring-boot-starter-parent + 3.2.2 + + + + com.github.xiaoymin + knife4j-openapi3-jakarta-spring-boot-starter + 4.4.0 + + + + org.springframework.boot + spring-boot-starter-web + + + + org.projectlombok + lombok + provided + + + + org.springframework.boot + spring-boot-devtools + runtime + true + + + + org.springframework.boot + spring-boot-starter-test + test + diff --git a/src/main/java/cn/hezhaohui/thumb/Application.java b/src/main/java/cn/hezhaohui/thumb/Application.java new file mode 100644 index 0000000..b3182fc --- /dev/null +++ b/src/main/java/cn/hezhaohui/thumb/Application.java @@ -0,0 +1,11 @@ +package cn.hezhaohui.thumb; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class Application { + public static void main(String[] args) { + SpringApplication.run(Application.class, args); + } +} diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..c4ba413 --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,24 @@ +spring: + application: + name: thumb-up + mvc: + servlet: + path: /api + +# springdoc-openapi项目配置 +springdoc: + swagger-ui: + path: /swagger-ui.html + tags-sorter: alpha + operations-sorter: alpha + api-docs: + path: /v3/api-docs + group-configs: + - group: 'default' + paths-to-match: '/**' + packages-to-scan: cn.hezhaohui.thumb.controller +# knife4j的增强配置,不需要增强可以不配 +knife4j: + enable: true + setting: + language: zh_cn \ No newline at end of file diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml new file mode 100644 index 0000000..99245fb --- /dev/null +++ b/src/main/resources/logback.xml @@ -0,0 +1,9 @@ + + + + + + + + +