This project has implemented all the crud operations in a simple way with H2 embedded database, custom exceptions and tests for controller class and service class.
- Save
- Show all
- Find by ID
- Find by Email
- Find by Index number
- Find between two dates of birth
- Update by ID
- Delete by ID
- Delete by Email
- Eclipse IDE
- Java 11
- Spring
- Spring initializr
- H2 Embedded Database
- Download source code and import into your code editor (Eclipse, IntelliJ..).
- The project is created with Maven, so you just need to import it to your IDE and build the project to resolve the dependencies
- If there are no errors, run program.
- Use Postman to check app or use tests.
Add student with this in body:
{
"firstName": "Ognjen",
"lastName": "Andjelic",
"dateOfBirth": "1994-06-23",
"email": "andjelicb.ognjen@gmail.com",
"indexNumber": 101,
"isOnBudget": true / false
}
List all students from DB.
Find student in DB by ID.
Find student in DB by Email.
Find student in DB by Index.
Find students (list) between two dates of birth.
Put this as example parameters:
KEY: dob1
VALUE: 1999-12-01
KEY: dob2
VALUE: 2004-10-12
Update student with ID.
Add data in the body like saving student but you don't need to input all fields.
Input only fields that you want to change.
Delete student with ID.
Delete student with Email.