My question is I need to implement rest api to search Students bases on its attributes below are my urls.
@RequestMapping(value = “my system/vo1/students/search", method = RequestMethod.GET)
@ResponseBody
public Students searchStudentByName(
@RequestParam(value = “name",required = true) String name,
@RequestParam(value = “ responseType", required = true) String responseType)
{
//do student fetching works
}
@RequestMapping(value = “my system/vo1/students/search", method = RequestMethod.GET)
@ResponseBody
public Students searchStudentByAge(
@RequestParam(value = “age",required = true) int age,
@RequestParam(value = “ responseType", required = true) String responseType)
{
//do student fetching works
}
Aucun commentaire:
Enregistrer un commentaire