- Springboot
- Maven
- Java corretto 11
- Spring JPA
- MariaDB
- Spring Security
- Thymeleaf
Your task is to create a basic School Management System where students can register for courses, and view the course assigned to them.
Website with links to each service
- homepage
- create/modify student
- create/modify course
- view students
- find student by email
- view courses
starter dependencies:
- Spring web
- Spring Boot DevTools
- Lombok
- Thymeleaf
- Mariadb Driver
- Spring Data JPA
- Validation
Models requires:
- no args constructor
- all args constructor
- required args constructor
- setters and getter
- toString (exclude collections to avoid infinite loops)
- override equals and hashcode methods (don't use lombok here)
- helper methods
Field | Datatype | Description | Database attributes @Column() |
---|---|---|---|
String | Student’s unique identifier | Primary key, 50 character limit, name email |
|
name | String | Student’s name | 50 character limit, not null, name name |
password | String | Student’s password | 50 character limit not null, name password |
courses | List<Course> | Student courses list | Join table strategy name student_courses , name of student primary key column student_email and inverse primary key (courses) column courses_id , fetch type eager , cascade all except remove |
Field | Datatype | Description | Database attributes @Column() |
---|---|---|---|
id | int | Course unique identifier | Primary key |
name | String | Course name | 50 character limit, not null |
instructor | String | Instructor name | 50 character limit not null |
students | List<Student> | Course learners list | fetch type eager , cascade all except remove, mappedBy courses |
Abstract method | Return type | Parameters | Description |
---|---|---|---|
findStudentCourses | List<Course> | String email | return student courses |
implement interfaces:
- StudentService: implement StudentRepository required methods.
- CourseService: implement CourseRepository required methods.
- general endpoints
- mapping for services
- mapping for services
- build a template using thymeleaf fragments
- implement spring security
- hide/show services using thymeleaf
- use mock database H2 to test data
- AssertJ tests