- GET api/employees/all -Gets all employess status=active + inactive
- GET api/employees -Gets all the active employees
- GET api/employees/{id} -Gets a single active employee
- POST api/employee -Create a new employee
- PUT api/employees/{id} -Update an employee
- DELETE api/employees/{id} -Delete an employee (by status=inactive)
- DELETE api/actual/employees/{id} -Delete an employee from DB
- DELETE api/actual/Employees -Delete all the employees from DB
- POST api/employees/Injest -Bulk create list of employees from a file
To import list of employees from the pre-filled csv formatted file. Steps:
- Click on button "Employee Injest"
- Browse the pre-filled comma (,) separated file as per below format
- The CSV format is described below. Click Here to get Template a link
EmpID, First Name, Middle Initial, Last Name, Date of Birth(YYYY-DD), Date of Employment(YYYY-MM-DD)
- Click on "Submit"
- On success a message will be displayed and user can navigate to view all the list of employees.
- By default the employees created will be with status="ACTIVE"
- It uses POST method to send file as multipart.
- Start the mongo db
- Get the monogo db related setting to update in the application
- Copy source
mkdir be
cd be
git clone https://github.com/kameshGithub/empmgmt.git
- Till the external configuration or proxy/gateway/service discovery feature is implemented, below manual configuration is required.
1. Go to .\src\main\java\com\kamesh\empmgmt\employee\controller\EmployeeController.java
2. Go to Line 46, and replace the URL of your Front-end application.
3. Go to .\src\main\resources\application.properties and change the required settings e.g. mongo db related.
- If you already have one, change the configuration accordingly.
mvn compile
mvn spring:boot run
- The server will be launched at http://localhost:5000/