little modifications in controller Teacher

pull/1/head
Roxane ROSSETTO 1 year ago
parent 087421b2da
commit a528b354be

@ -1,6 +1,8 @@
package SAE.ApiREST.WebService.Controller;
import SAE.ApiREST.WebService.Model.Teacher;
import SAE.ApiREST.WebService.Service.ITeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
@ -10,11 +12,11 @@ import java.time.format.DateTimeFormatter;
@Controller
@RequestMapping("/ProfWebService")
public class TeacherController {
@Autowired
private ITeacherService iTeacherServ;
private Teacher profC;
public TeacherController() {
this.profC = new Teacher(1, LocalDate.parse("12-01-2023", DateTimeFormatter.ISO_DATE), "aline.alipres@gmail.com", "MsGarconManque");
public TeacherController(ITeacherService iserv) {
this.iTeacherServ = iserv;
}
}

Loading…
Cancel
Save