@RequestMapping(value = "student-filter", method = RequestMethod.GET)
public ResponseEntity<?> findAllByFilter(@RequestParam(value = "active") int active,
@RequestParam(value = "queryStatus") int queryStatus,
@RequestParam(value = "criterion") String criterion) {
List<Student> student=null;
try {
students = this.studentService.findStudentByFilter(criterion);
students = this.studentService.findAllByFilter(criterion);
} catch(DataAccessException e) {
return new ResponseEntity<>( HttpStatus.INTERNAL_SERVER_ERROR);
}
if(students == null) {
return new ResponseEntity<>(HttpStatus.NOT_FOUND);
}
return new ResponseEntity<List<Student>>(students, HttpStatus.OK);
}
您如何将此代码转换为有角度的代码? 我想在Angular版本中获得这个Spring Rest API代码