@ResponseStatus(HttpStatus.OK)
public void update(@RequestParam("id")Integer id, @RequestBody Teacher teacher){
logger.debug("Received rest request to update teacher");
// teacherService.update(id, teacher);
Teacher oldTeacher = teacherRepository.findOne(id);
oldTeacher.setAcademicDegree(teacher.getAcademicDegree());
oldTeacher.setAddress(teacher.getAddress());
oldTeacher.setFirstName(teacher.getFirstName());
oldTeacher.setLastName(teacher.getLastName());
oldTeacher.setSex(teacher.getSex());
teacherRepository.save(oldTeacher);
}