Skip to content

crni99/Student-Management-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 

Repository files navigation

Student Management System

Introduction

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.

Features of this Project

  • 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

Environment

  • Eclipse IDE
  • Java 11
  • Spring
  • Spring initializr
  • H2 Embedded Database

Operating Instructions

  • 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.

Testing

  • POST METHOD

  • /add

Add student with this in body:
{
"firstName": "Ognjen",
"lastName": "Andjelic",
"dateOfBirth": "1994-06-23",
"email": "andjelicb.ognjen@gmail.com",
"indexNumber": 101,
"isOnBudget": true / false
}

  • GET METHOD

  • /all

List all students from DB.

  • /find/{id}

Find student in DB by ID.

  • /email/{email}

Find student in DB by Email.

  • /index/{index}

Find student in DB by Index.

  • /date-of-birth

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

  • PUT METHOD

  • /update/{id}

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 METHOD

  • /delete/{id}

Delete student with ID.

  • /delete-with-email/{email}

Delete student with Email.

About

CRUD RESTFul API using Java Spring Boot, Maven, and embedded H2 database.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages