After starting the app, some test data is generated automatically.
For Open API (Swagger) Documentation UI and the endpoints, open http://localhost:8060/swagger-ui.html/ after running the app.
The Postman Collection shared in the resources can be modified and used for testing the endpoints.
The following endpoints can be used in order to test services:
Note
All URIs are relative to http://localhost:8060
Class | Method | HTTP request | Description |
---|---|---|---|
EmployeeController | add | POST /employees/ | Adds a new employee |
EmployeeController | findAll | GET /employees | Retrieves all employees |
EmployeeController | findById | GET /employees/{id} | Retrieves a single employee by the given id |
EmployeeController | findByDepartmentId | GET /employees/departments/{id} | Retrieves employees by the given department id |
EmployeeController | findByOrganizationId | GET /employees/organizations/{id} | Retrieves employees by the given organization id |
Class | Method | HTTP request | Description |
---|---|---|---|
DepartmentController | add | POST /departments/ | Adds a new employee |
DepartmentController | findAll | GET /departments | Retrieves all departments |
DepartmentController | findById | GET /departments/{id} | Retrieves a single employee by the given id |
DepartmentController | findByOrganizationId | GET /departments/organizations/{id} | Retrieves departments by the given organization id |
DepartmentController | findByOrganizationWithEmployees | GET /departments/organizations/{id} | Retrieves departments with employees by the given organization id |
Class | Method | HTTP request | Description |
---|---|---|---|
OrganizationController | add | POST /organizations/ | Adds a new organization |
OrganizationController | findAll | GET /organizations | Retrieves all organizations |
OrganizationController | findById | GET /organizations/ | Retrieves a single organization by the given id |
OrganizationController | findByIdWithDepartments | GET /organizations/{id}/departments/ | Retrieves organizations with departments by the given organization id |
OrganizationController | findByIdWithEmployees | GET /organizations/{id}/employees/ | Retrieves organizations with employees by the given organization id |
OrganizationController | findByIdWithDepartmentsAndEmployees | GET /organizations/{id}/departments/employees/ | Retrieves organizations with departments and employees by the given organization id |
After starting all the services, Eureka Dashboard would be available on http://localhost:8061/.
In order to access Zipkin dashboard, open http://localhost:9411/zipkin/, click Run Query
and then check the collected traces.