docs: Refresh deployment and API documentation
- Align deployment guidance with the current three-node Compose topology - Document the current frontend architecture and development workflow - Replace the stale API list with a controller-based route index
This commit is contained in:
+13
-30
@@ -1,34 +1,17 @@
|
||||
# video-common模块实现步骤和代码
|
||||
# video-common 模块
|
||||
|
||||
基于Spring Boot 3.2.4、Spring Cloud 2023.0.1和Spring Cloud Alibaba 2023.0.1.0技术栈,完整实现video-common模块。
|
||||
`video-common` 是后端共享库,不独立启动,也不提供 HTTP 接口。当前源代码位于 `backend/video-common/src/main/java/com/nuaa/video/common`。
|
||||
|
||||
## 目录结构设计
|
||||
## 当前职责
|
||||
|
||||
首先,创建以下目录结构:
|
||||
- `config`:Feign、MinIO、MyBatis-Plus、Redis、Web MVC 配置及自动填充处理器
|
||||
- `constants`:通用常量与安全常量
|
||||
- `exception`:`BusinessException` 和全局异常处理
|
||||
- `model`:统一返回体 `Result`、分页请求 `PageRequestDTO`、基础实体 `BaseEntity`、状态码枚举
|
||||
- `utils`:JWT、Redis、MinIO、分页、日期、字符串工具
|
||||
|
||||
```
|
||||
video-common/
|
||||
├── src/
|
||||
│ ├── main/
|
||||
│ │ ├── java/
|
||||
│ │ │ └── com/
|
||||
│ │ │ └── nuaa/
|
||||
│ │ │ └── video/
|
||||
│ │ │ └── common/
|
||||
│ │ │ ├── annotation/ # 自定义注解
|
||||
│ │ │ ├── config/ # 配置类
|
||||
│ │ │ ├── constants/ # 常量定义
|
||||
│ │ │ ├── exception/ # 异常处理
|
||||
│ │ │ ├── model/ # 通用数据模型
|
||||
│ │ │ │ ├── dto/ # 数据传输对象
|
||||
│ │ │ │ ├── entity/ # 实体类
|
||||
│ │ │ │ ├── enums/ # 枚举类
|
||||
│ │ │ │ └── vo/ # 视图对象
|
||||
│ │ │ ├── utils/ # 工具类
|
||||
│ │ │ └── feign/ # Feign接口
|
||||
│ │ └── resources/
|
||||
│ │ └── META-INF/
|
||||
│ │ └── spring.factories # 自动配置
|
||||
│ └── test/
|
||||
└── pom.xml
|
||||
```
|
||||
## 主要依赖
|
||||
|
||||
Spring Web、Validation、OpenFeign、Sentinel、MyBatis-Plus、MySQL Driver、Redis、MinIO、JJWT、Hutool 和 Lombok。自动配置入口仍为 `src/main/resources/META-INF/spring.factories`。
|
||||
|
||||
业务服务需依赖本模块,但不应在业务模块中复制统一响应、异常、JWT 或对象存储实现。
|
||||
|
||||
Reference in New Issue
Block a user