# StudentTraining **Repository Path**: jackdawcell/student-training ## Basic Information - **Project Name**: StudentTraining - **Description**: LHJ的培训内容 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-05-14 - **Last Updated**: 2025-05-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## Postman使用步骤 #### 导入收藏集: 打开Postman → Import → 选择本项目目录的 Resource/培训.postman_collection.json 环境配置: 建议创建 localhost 环境,设置 base_url 为 http://127.0.0.1:8082 点击对应接口即可测试 ## API接口使用指南 #### 1. 按性别学生分组 ```http GET /api/students/group-by-sex ``` #### 2. 根据学生姓氏分组 ```http GET /api/students/group-by-first-letter ``` #### 3. 找出同名的学生 ```http GET /api/students/distinct-names ``` #### 4. 分別找出姓名長度係2、3、4的學生列表 ```http GET /api/students/group-by-name-length ``` #### 5. 根據學生學號排序,倒敘和順序 ```http GET /api/students/sorted?desc=1 ``` #### 6. 根據學生戶籍進行去重,並且輸出用逗號(,)連接的字符串 ```http GET /api/students/distinct-hometowns ``` #### 7. 新增学生 ```http POST /api/students/add Content-Type: application/json { "id": 101, "name": "张三", "sex": "男", "hometown": "北京" } ``` #### 8. 修改学生 ```http GET /api/students/update?id=10 Content-Type: application/json { "id": 12, "name": "周小说", "sex": "男", "hometown": "成都" } ``` #### 9. 删除学生 ```http GET /api/students/remove?id=10 ```