Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/main/java/com/amigoscode/demo/student/StudentController.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@

@RestController
@RequestMapping("api/students")
@AllArgsConstructor
public class StudentController {

private final StudentService studentService;

@Autowired
public StudentController(StudentService studentService) {
this.studentService = studentService;
}
// TODO: NOT RECOMMENDED : @AllArgs-- annotation
// @Autowired
// public StudentController(StudentService studentService) {
// this.studentService = studentService;
// }

@GetMapping
public List<Student> getAllStudents() {
Expand Down