Aimed to show RestFul api structure using a Map object.
Map<String, Course>
Why key field is String at V1 because we wanted to generate UUID when inserting a course via POST method. But we couldn't use it because there is time contstraint at presentation.
GET http://localhost:8080/course
GET http://localhost:8080/course/1
POST http://localhost:8080/course
Content-Type: application/json
{"id": "3", "name": "Scala"}
DELETE http://localhost:8080/course/2
Aimed to show Restful api structure using h2 database.
Created a new Controller named ControllerV2 for v2 api.
Created CourseRepository class to access database objects on the fly.
Created CourseService class to take database result from the repository to present it to the controller.
GET http://localhost:8080/v2/course
GET http://localhost:8080/v2/course/1
POST http://localhost:8080/v2/course
Content-Type: application/json
{"name": "Haskell"}
POST http://localhost:8080/v2/course
Content-Type: application/json
{"name": "Elixir"}