开发者社区 问答 正文

如何ResponseEntity返回布尔值

//Controller
 @PutMapping("/update-student")
    public ResponseEntity<Student>updateStudent(@RequestBody Student student)throws Exception{
        boolean getStudent = studentService.updateStudent(student);
        return new ResponseEntity<Student>(getStudent,HttpStatus.OK);
    }

展开
收起
几许相思几点泪 2019-12-17 18:13:42 1160 分享 版权
1 条回答
写回答
取消 提交回答
问答地址: