diff --git a/README.md b/README.md index a8348670..656cb9a2 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ export DASHSCOPE_API_KEY=your-key-here mvn spring-boot:run # Backend runs at http://localhost:18088 # H2 Console: http://localhost:18088/h2-console -# API Docs (Knife4j): http://localhost:18088/doc.html +# API Docs (SpringDoc OpenAPI): http://localhost:18088/swagger-ui.html ``` **2. Start the frontend** @@ -176,7 +176,7 @@ mateclaw/ | Database | H2 (dev) / MySQL 8.0+ (prod) | | ORM | MyBatis Plus 3.5 | | Authentication | Spring Security + JWT | -| API Docs | Knife4j (OpenAPI 3) | +| API Docs | SpringDoc OpenAPI 3 | | Frontend | Vue 3 + TypeScript + Vite | | State Management | Pinia | | UI Components | Element Plus | diff --git a/README_zh.md b/README_zh.md index 55b5cd2a..06f3b99f 100644 --- a/README_zh.md +++ b/README_zh.md @@ -76,7 +76,7 @@ export DASHSCOPE_API_KEY=your-key-here mvn spring-boot:run # 后端运行在 http://localhost:18088 # H2 控制台:http://localhost:18088/h2-console -# API 文档(Knife4j):http://localhost:18088/doc.html +# API 文档(SpringDoc OpenAPI):http://localhost:18088/swagger-ui.html ``` **2. 启动前端** @@ -176,7 +176,7 @@ mateclaw/ | 数据库 | H2(开发)/ MySQL 8.0+(生产) | | ORM | MyBatis Plus 3.5 | | 认证 | Spring Security + JWT | -| API 文档 | Knife4j (OpenAPI 3) | +| API 文档 | SpringDoc OpenAPI 3 | | 前端框架 | Vue 3 + TypeScript + Vite | | 状态管理 | Pinia | | UI 组件 | Element Plus | diff --git a/mateclaw-server/pom.xml b/mateclaw-server/pom.xml index b57b5293..a0a53de7 100644 --- a/mateclaw-server/pom.xml +++ b/mateclaw-server/pom.xml @@ -28,7 +28,7 @@ 1.1.2.2 3.5.16 5.8.26 - 4.5.0 + 2.8.16 0.12.6 @@ -42,6 +42,14 @@ pom import + + + org.springdoc + springdoc-openapi-bom + ${springdoc.version} + pom + import + @@ -157,11 +165,10 @@ runtime - + - com.github.xiaoymin - knife4j-openapi3-jakarta-spring-boot-starter - ${knife4j.version} + org.springdoc + springdoc-openapi-starter-webmvc-ui diff --git a/mateclaw-server/src/main/java/vip/mate/config/SecurityConfig.java b/mateclaw-server/src/main/java/vip/mate/config/SecurityConfig.java index 781f78aa..524aaa8a 100644 --- a/mateclaw-server/src/main/java/vip/mate/config/SecurityConfig.java +++ b/mateclaw-server/src/main/java/vip/mate/config/SecurityConfig.java @@ -52,7 +52,7 @@ public class SecurityConfig { .requestMatchers( "/api/v1/auth/login", "/api/v1/settings/language", - "/doc.html", + "/swagger-ui.html", "/swagger-ui/**", "/v3/api-docs/**", "/webjars/**", diff --git a/mateclaw-server/src/main/resources/application.yml b/mateclaw-server/src/main/resources/application.yml index d29e86ea..2a41d0a0 100644 --- a/mateclaw-server/src/main/resources/application.yml +++ b/mateclaw-server/src/main/resources/application.yml @@ -61,12 +61,6 @@ mybatis-plus: logic-delete-value: 1 logic-not-delete-value: 0 -# Knife4j API 文档 -knife4j: - enable: true - setting: - language: zh_cn - # SpringDoc OpenAPI springdoc: api-docs: