- 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
Clone repository to your local machine and follow steps to make endpoint request below
- Have Java 8 Installed
Endspoint = POST http://localhost:8080/department
{ "departmentName":"EG", "departmentAddress":"Wuse 2", "departmentCode":"EG-01" }
Endspoint = GET http://localhost:8080/department
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
Endspoint = DELETE http://localhost:8080/department/id
NB: You are to provide department id in place of id in url while making delete request
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.