考试系统 - 基于 Spring Boot + Vue 3 + MySQL 的在线考试管理系统
- 用户管理:支持用户注册、登录、批量导入
- 题目管理:支持多种题型(单选、多选、判断、简答),支持批量导入
- 考试管理:创建考试、设置考试时间和规则
- 试卷管理:组卷和管理试卷模板
- 成绩分析:查看考试成绩和统计分析
- Spring Boot 2.6.4
- MyBatis Plus 3.4.3
- MySQL 8.0
- Druid 连接池
- Vue 3
- Vite
- Element Plus
- Vue Router
- Pinia
- Docker
- Docker Compose
- Nginx
- 克隆项目
git clone https://github.com/lll-hhh/Exam_System.git
cd Exam_System- 配置数据库
# 确保MySQL已安装并运行,然后导入数据库
mysql -u root -p < init-db/init.sql- 一键启动
chmod +x start.sh
./start.sh- 访问应用
- 前端地址:http://localhost:3000
- 后端API:http://localhost:8080
- 停止服务
./stop.sh- 克隆项目
git clone https://github.com/lll-hhh/Exam_System.git
cd Exam_System- 启动所有服务(包含数据库)
docker compose up -d- 访问应用
- 前端地址:http://localhost
- 后端API:http://localhost:8080
- 数据库:localhost:3306
- 停止服务
docker compose downcd frontend
npm install
npm run devcd backend
mvn spring-boot:run# 导入 init-db/init.sql 到 MySQL
mysql -u root -p < init-db/init.sql- 用户名:admin
- 密码:admin123
.
├── backend/ # 后端代码
│ ├── src/
│ │ └── main/
│ │ ├── java/
│ │ └── resources/
│ ├── Dockerfile
│ └── pom.xml
├── frontend/ # 前端代码
│ ├── src/
│ │ ├── api/ # API接口
│ │ ├── router/ # 路由配置
│ │ ├── stores/ # 状态管理
│ │ ├── utils/ # 工具函数
│ │ └── views/ # 页面组件
│ ├── Dockerfile
│ ├── nginx.conf
│ └── package.json
├── init-db/ # 数据库初始化脚本
│ └── init.sql
├── logs/ # 日志目录
├── docker-compose.yml # Docker编排文件
├── start.sh # 启动脚本
├── stop.sh # 停止脚本
├── STARTUP.md # 启动说明文档
└── README.md
主要API端点:
- 用户相关:
/user/* - 题目相关:
/problem/* - 考试相关:
/exam/* - 试卷相关:
/paper/*
可以在 docker-compose.yml 中配置以下环境变量:
MYSQL_ROOT_PASSWORD: MySQL root密码MYSQL_DATABASE: 数据库名称
docker-compose downdocker-compose down -vMIT License