An open API service indexing awesome lists of open source software.

https://github.com/crni99/student-management-system

CRUD RESTFul API using Java Spring Boot, Maven, and embedded H2 database.
https://github.com/crni99/student-management-system

api crud crud-operations database h2-database java rest rest-api restful-api spring

Last synced: 11 months ago
JSON representation

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

Awesome Lists containing this project

README

          

# 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](https://www.postman.com) to check app or use tests.

## Testing
### URL : http://localhost:8080/api/v1/student-ms +
- ## 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.