[TOC]
# 1 功能概述
碩果云,基于Spring Cloud搭建的新一代微服務教學管理平臺,提供多租戶、權限管理、考試、練習等功能。
題型支持單選題、多選題、不定項選擇題、判斷題、簡答題等
在線體驗:
- 前臺:[http://118.25.138.130/](http://118.25.138.130/)
- 后臺:[http://118.25.138.130:81/](http://118.25.138.130:81/)
賬號:
| 單位ID | 賬號 | 密碼 | 角色 |
| --------- | -------- | -------- | -------- |
| gitee | admin | 123456 | 管理員 |
| gitee | student | 123456 | 學生 |
| gitee | teacher | 123456 | 老師 |
項目分前臺網站和后臺管理兩部分,前臺主要提供考試功能,后臺提供基礎管理、考試管理功能。
前臺主要提供在線考試、在線學習功能
后臺管理分為:系統管理、系統監控、考務管理、附件管理、個人管理
系統管理:提供用戶、部門、角色、權限等基礎管理
- 用戶管理:用戶信息增刪改查、導入導出
- 部門管理:部門信息增刪改查
- 角色管理:角色信息增刪改查、分配權限
- 菜單管理:菜單信息增刪改查、導入導出
- 終端管理:管理OAuth2.0的客戶端,如client_id、client_secret、access_token有效時間等
- 路由管理:網關路由管理,包括路由的增刪改查、刷新路由等
系統監控:監控服務、日志等
- 日志監控:查看系統日志
- `consul`監控:`consul`服務監控
- `zipkin`監控:監控服務的調用鏈路
- 服務監控:`spring boot admin`服務監控
- 接口文檔:`swagger api`文檔
考務管理:提供課程、考試、題庫、成績等管理
- 課程管理:課程信息增刪改查
- 考試管理:考試信息增刪改查、題目管理、發布回收,題目管理支持簡單文本、富文本輸入、從題庫添加等
- 題庫管理:題目分類增刪改查、題目信息增刪改查
- 成績管理:查看成績、導出成績
- 知識庫:知識庫增刪改查、上傳附件
附件管理:項目的所有附件存儲在`fastDfs`里,提供統一的管理入口
- 附件列表:管理所有附件,如用戶頭像、考試附件、知識庫附件等。
個人管理:管理個人資料和修改密碼
- 個人資料:姓名、頭像等基本信息的修改
- 修改密碼:修改密碼

# 2 技術選型
- 服務注冊與發現:`Consul`
- 熔斷器:`Hystrix` + `Turbine`
- 客戶端負載均衡:`Ribbon`
- 內部服務調用:`Feign`
- 網關:`Spring Cloud Gateway`
- 認證鑒權:`Spring Cloud OAuth2` + `JWT`
- 程序監控:`Spring Boot Admin` / `Spring Boot Actuator`
- 分布式配置中心:`Spring Cloud Config`
- 分布式調用鏈監控:`Spring Cloud Sleuth` + `Zipkin`
- 數據庫:`MySQL 5.7`
- 部署:`Docker` + `docker-compose`
- 構建工具:`Maven`
- 后臺 API 文檔:`Swagger`
- 消息隊列:`RabbitMQ`
- 文件存儲:`七牛云`
- 緩存:`Redis`
- 前端:`vue`
# 3 系統架構

# 4 核心依賴
| 名稱 | 版本 |
| --------- | -------- |
| `Spring Boot` | `2.1.11.RELEASE` |
| `Spring Cloud` | `Greenwich.SR4` |
# 5 項目結構
```
common -- 系統公共模塊
├── common-core -- 系統公共核心模塊
├── common-feign -- 系統公共feign模塊
├── common-log -- 系統公共日志模塊
└── common-security -- 系統公共安全模塊,包括資源服務器配置
modules -- 業務模塊
|-- auth-service-parent -- 認證授權服務
|-- auth-service-api -- 認證授權服務api
|-- auth-service -- 認證授權服務具體實現
|-- user-service-parent -- 用戶服務
|-- user-service-api -- 用戶服務api
|-- user-service -- 用戶服務具體實現
|── exam-service-parent -- 考試服務
|-- exam-service-api -- 考試服務api
|-- exam-service -- 考試服務具體實現
└── msc-service-parent -- 消息中心
|-- msc-service-api -- 消息中心api
|-- msc-service -- 消息中心具體實現
config-service -- 配置中心(本地倉庫)
gateway-service -- 網關(動態路由)
monitor-service -- spring boot amdin 監控服務
```
`common-core`: 封裝通用配置、常量、異常、基礎實體等
`common-config`: 通用基礎配置
`common-feign`:封裝通用feign配置,用于服務調用間攜帶access_token
`common-log`:封裝日志記錄邏輯,異步記錄日志
`common-security`: 封裝OAuth2.0中的資源服務器通用配置
## 6 系統截圖
### 前臺功能(點擊查看大圖)
<table>
<tr>
<td><img src="https://gitee.com/wells2333/sg-exam/raw/master/docs/images/image_web.png" alt="首頁"/></td>
<td><img src="https://gitee.com/wells2333/sg-exam/raw/master/docs/images/image_web_home.png" alt="首頁"/></td>
</tr>
<tr>
<td><img src="https://gitee.com/wells2333/sg-exam/raw/master/docs/images/image_web_exams.png" alt="考試列表"/></td>
<td><img src="https://gitee.com/wells2333/sg-exam/raw/master/docs/images/image_web_courses.png" alt="熱門課程"/></td>
</tr>
<tr>
<td><img src="https://gitee.com/wells2333/sg-exam/raw/master/docs/images/image_web_exam.png" alt="PC端考試"/></td>
<td><img src="https://gitee.com/wells2333/sg-exam/raw/master/docs/images/image_web_mobile.jpeg" alt="手機端考試"/></td>
</tr>
<tr>
<td><img src="https://gitee.com/wells2333/sg-exam/raw/master/docs/images/image_web_record.png" alt="考試記錄"/></td>
<td><img src="https://gitee.com/wells2333/sg-exam/raw/master/docs/images/image_web_incorrect_answer.png" alt="錯題列表"/></td>
</tr>
<tr>
<td><img src="https://gitee.com/wells2333/sg-exam/raw/master/docs/images/image_web_register.png" alt="注冊"/></td>
<td><img src="https://gitee.com/wells2333/sg-exam/raw/master/docs/images/image_web_login.png" alt="登錄"/></td>
</tr>
</table>
### 后臺功能(點擊查看大圖)
<table>
<tr>
<td><img src="https://gitee.com/wells2333/sg-exam/raw/master/docs/images/image_ui_login.png" alt="登錄"/></td>
<td><img src="https://gitee.com/wells2333/sg-exam/raw/master/docs/images/image_ui_exam.png" alt="首頁"/></td>
</tr>
<tr>
<td><img src="https://gitee.com/wells2333/sg-exam/raw/master/docs/images/image_ui_menu.png" alt="菜單"/></td>
<td><img src="https://gitee.com/wells2333/sg-exam/raw/master/docs/images/image_ui_menu_manage.png" alt="菜單管理"/></td>
</tr>
<tr>
<td><img src="https://gitee.com/wells2333/sg-exam/raw/master/docs/images/image_ui_role_manage.png" alt="角色管理"/></td>
<td><img src="https://gitee.com/wells2333/sg-exam/raw/master/docs/images/image_ui_route_manage.png" alt="路由管理"/></td>
</tr>
<tr>
<td><img src="https://gitee.com/wells2333/sg-exam/raw/master/docs/images/image_ui_subjects_manage.png" alt="題庫管理"/></td>
<td><img src="https://gitee.com/wells2333/sg-exam/raw/master/docs/images/image_ui_subjects_rich_edit.png" alt="題目編輯"/></td>
</tr>
<tr>
<td><img src="https://gitee.com/wells2333/sg-exam/raw/master/docs/images/image_ui_score_manage.png" alt="成績管理"/></td>
<td><img src="https://gitee.com/wells2333/sg-exam/raw/master/docs/images/image_ui_score_detail.png" alt="成績詳情"/></td>
</tr>
<tr>
<td><img src="https://gitee.com/wells2333/sg-exam/raw/master/docs/images/image_ui_log_manage.png" alt="日志監控"/></td>
<td><img src="https://gitee.com/wells2333/sg-exam/raw/master/docs/images/image_ui_consul.png" alt="consul監控"/></td>
</tr>
</table>
### 系統監控(點擊查看大圖)
<table>
<tr>
<td><img src="https://gitee.com/wells2333/sg-exam/raw/master/docs/images/image_ui_spring_boot_admin.png" alt="服務監控"/></td>
<td><img src="https://gitee.com/wells2333/sg-exam/raw/master/docs/images/image_ui_spring_boot_admin01.png" alt="服務監控"/></td>
</tr>
<tr>
<td><img src="https://gitee.com/wells2333/sg-exam/raw/master/docs/images/image_ui_swagger.png" alt="swagger文檔"/></td>
<td><img src="https://gitee.com/wells2333/sg-exam/raw/master/docs/images/image_ui_elk.png" alt="elk日志"/></td>
</tr>
<tr>
<td><img src="https://gitee.com/wells2333/sg-exam/raw/master/docs/images/image_ui_zipkin1.png" alt="zipkin"/></td>
<td><img src="https://gitee.com/wells2333/sg-exam/raw/master/docs/images/image_ui_zipkin2.png" alt="zipkin"/></td>
</tr>
</table>
# 7 后續規劃
- [x] 短信驗證碼,第三方登錄
- [x] 多選題,判斷題,簡答題,題庫完善
- [ ] 調查問卷、二維碼分享、移動端答題
- [ ] 作業、考試、知識點管理、考試成績排名、圖表展示
- [ ] 學生簽到、請假
- [ ] 智能組卷,在線學習,成績排名