A simple example associated with my blog post.
In this project, PostgreSQL database is used to persist data.
So, make sure to install it and replace your own database credentials in NoteDatabase.java
file.
That is my mistake to make it more completed.
$ ./gradlew appRun
- Get all notes
- Method:
GET
- URL:
localhost:8080/api/v1/notes
- Response body data type: Plain Text
- Success code: 200 Ok
- Method:
- Add new note
- Method:
POST
- URL:
localhost:8080/api/v1/notes
- Success code: 201 Created
- Method:
- Get a note
- Method:
GET
- URL:
localhost:8080/api/v1/notes/{noteId}
- Response body data type: Plain Text
- Success code: 200 Ok
- Method:
- Update a note
- Method:
PUT
- URL:
localhost:8080/api/v1/notes/{noteId}
- Request body data type: Plain Text
- Response body data type: Plain Text
- Success code: 200 Ok
- Method:
- Delete a note
- Method:
DELETE
- URL:
localhost:8080/api/v1/notes/{noteId}
- Success code: 204 No Content
- Method: