You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在Spring Boot中实现学生信息管理API并通过Postman调试

Spring Boot 学生管理API实现

已创建Controller、Repository和Student类,需实现以下三个接口,支持Postman以JSON格式调用:

1. 新增学生接口 /newStudent

请求体

{
  "name":"Shubham",
  "rollno":22,
  "studentid":1
}

响应

{
  "status":"OK",
  "message":"Data Added"
}

2. 录入学生成绩接口 /enterMarks

请求体

{
  "studenid":1,
  "hindimarks":34,
  "mathsmarks":12,
  "scimarks":34,
  "total":,
  "avg":,
  "status":
}

响应

{
  "status":"OK",
  "message":"Data Added"
}

3. 获取学生列表接口 /getStudentList

响应

[
  {
    "name":"Shubham",
    "rollno":22,
    "studentid":1
  },
  {
    "name":"Aman",
    "rollno":22,
    "studentid":2
  }
]

内容的提问来源于stack exchange,提问作者SHUBHAM SHARMA

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.16 10:50:36