A SpringBoot MVC project that manages employees in an organization
For more info -> Problem Statement.pdf
Extract the project
Open in any IDE like STS or Eclipse etc..
Right click and select Run as
Select Spring Boot Starter
Open localhost:8080
Open MongoDb compass -> create a database "sreekar" -> create a collection "employees"
Structure of document while inserting data -> POST : "localhost:8080/v1/addEmployee"
{
"name" : "Shiva",
"phone" : "7660815",
"email" : "Shiva@gmail.com",
"reportsTo" : "2c983dfa-613f-40b4-a2eb-2830d10304ea",
"image" : "https://media.licdn.com/dms/image/C5603AQHOeatHfjLymw/profile-displayphoto-shrink_800_800/0/1638463445803?e=2147483647&v=beta&t=Ui9uEReSp9CVcobWfAASMyE6gMIpyl1VY8AicktPe38"
}
GET : localhost:8080/v1/getAllEmployees
DELETE : localhost:8080/v1/deleteEmployee/{id}
PUT : localhost:8080/v1/updateEmployee/{id}
GET : localhost:8080/v1/getNthManager/{id}/{n}
GET : localhost:8080/v1/getAllEmployees/{field} -> Sort using a field like name or email etc...
GET : localhost:8080/v1/getAllEmployees/pageNo={pageNo}/pageSize={pageSize}/sortBy={field} -> Sort and pagination
-> EMail is implemented in createEmployee