Files
game_server/docs/README.md

101 lines
2.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 游戏平台后端服务
基于 Spring Boot WebFlux + MyBatis + MySQL 的游戏平台后端服务。
## 🚀 快速开始
### 环境要求
- JDK 17+
- Maven 3.6+
- MySQL 8.0+
### 启动步骤
1. 配置数据库连接(`application.yml`
2. 运行 `mvn spring-boot:run`
3. 访问 http://localhost:8080
## 📚 API 文档
### Swagger UI
启动应用后,访问以下地址查看交互式 API 文档:
- **Swagger UI**: http://localhost:8080/swagger-ui.html
- **OpenAPI JSON**: http://localhost:8080/api-docs
- **OpenAPI YAML**: http://localhost:8080/api-docs.yaml
### 接口分组
- **管理员账户管理**: `/api/admin/accounts` 相关接口
- **用户账户管理**: `/api/users` 相关接口
### 使用说明
详细的使用说明请参考:[Swagger使用说明.md](docs/Swagger使用说明.md)
## 🔧 主要功能
### 用户管理
- 用户账户的增删改查
- 支持管理员和代理两种用户类型
- 账户状态管理(启用/禁用)
- 密码重置功能
### 认证授权
- JWT Token 认证
- 基于角色的权限控制
- 安全的密码加密存储
## 📁 项目结构
```
src/main/java/com/gameplatform/server/
├── config/ # 配置类
├── controller/ # 控制器
│ ├── admin/ # 管理员接口
│ └── ... # 其他接口
├── service/ # 业务逻辑
├── mapper/ # 数据访问层
├── model/ # 数据模型
│ ├── dto/ # 数据传输对象
│ └── entity/ # 实体类
└── security/ # 安全相关
```
## 🔐 认证说明
### JWT Token
- 访问令牌有效期30分钟
- 刷新令牌有效期7天
- 支持强制登出功能
### 权限控制
- 管理员接口需要管理员权限
- 用户接口支持公开访问仅限AGENT类型
## 📖 文档
- [API文档](docs/API文档.md) - 详细的API接口说明
- [Swagger使用说明](docs/Swagger使用说明.md) - Swagger文档使用指南
## 🛠️ 开发
### 编译
```bash
mvn compile
```
### 测试
```bash
mvn test
```
### 打包
```bash
mvn package
```
## 📝 更新日志
### v1.0.0
- 初始版本发布
- 基础的用户管理功能
- JWT认证系统
- Swagger API文档集成