Skip to content

This simple application manages department name, address and code. Its a stand alone spring boot application can serve any front end.

Notifications You must be signed in to change notification settings

omoluabidotcom/Simple-department-management

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rest-API that manage's Department data

This is a Guide to use this API locally.

API Overview

  • Currently uses MySQL database (But properties to use PostGreSQL, or H2 in-memory database are added to Application.properties file but commented out)
  • Has five endpoints
  • Perform CRUD operation
  • Database table has four columns i.e departmentId(Autogenerated), departmentName, departmentAddress and departmentCode

Usage

Clone repository to your local machine and follow steps to make endpoint request below

Prerequisite

  • Have Java 8 Installed

Endpoints and how to make request

Post Request endpoint sample

Endspoint = POST http://localhost:8080/department

{ "departmentName":"EG", "departmentAddress":"Wuse 2", "departmentCode":"EG-01" }

Get All Request endpoint sample

Endspoint = GET http://localhost:8080/department

Get each department Request endpoint sample

Endspoint = GET http://localhost:8080/department/id

NB: For each you will provide department id as a path variable in the url i.e replace id with department id in url

Delete Request endpoint sample

Endspoint = DELETE http://localhost:8080/department/id

NB: You are to provide department id in place of id in url while making delete request

Put Request endpoint sample

Endpoint = PUT http://localhost:8080/department/id

{ "departmentName":"HR", "departmentAddress":"Garki 2" "departmentCode": "HR-01" }

NB: You are to provide department id in place of id in url while making put request

PS: Your application will run on port 8080 by default, you can change that in the application.properties file.

About

This simple application manages department name, address and code. Its a stand alone spring boot application can serve any front end.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages