I had followed the “Student” Spring Boot project from spring.io.
@Controller
public class StudentController {
private StudentService studentService;
public StudentController(StudentService studentService) {
super();
this.studentService = studentService;
}
@GetMapping("/students")
public String listStudents(Model model) {
model.addAttribute("students", studentService.getAllStudents());
return "students";
}
@GetMapping("/students/new")
public String createStudentForm(Model model) {
Student student = new Student();
model.addAttribute("student", student);
return "create_student";
}
@PostMapping("/students")
public String saveStudent(@ModelAttribute("student") Student student) {
studentService.saveStudent(student);
return "redirect/students";
}
The problem is that I cannot associate the project with a new created runtime. I had consulted this post posr But I did not created a dynamic web project from Eclipse however I imported a project from initialzr with the dependencies. I have already re-installed Eclipse and tried to change the compiler 1.8 (17, 21) but I have never got access to target runtime when I click properties on the project. Any idea would be being accepted with many thanks
reinstall eclipse (2024)
1