Implementation of RESTful API for a mock employee database system as an exercise in OOP and Java programming.
| Method | Endpoint | Description |
|---|---|---|
| GET | /employees | Retrieves list of all employees |
| POST | /employees | Adds new employee |
| PUT | /employees/{id} | Amends specific employee |
| DELETE | /employees/{id} | Deletes employee |
GET http://localhost:8080/employees
PUT http://localhost:8080/employees/3 {"name": "Hamada", "role": "Athlete"}
The program was switched from a H2 memory database to a MySQL database
Bug fixes in database loading methods.
Removed all autoconfiguring of beans and controller handling.
Three JUnit tests were added to test basic program functionality:
- Initialization sanity test
- Unit test for DTO wrapper
- Slice test for GET method
Addition of DTOs to isolate the calls from the direct database, with a dedicated mapper class.
Initial application featuring a H2 database in a Spring boot environment, comprised of a simple employee class, a JPA repository, and a simple controller.