A super simplified Spring Boot service built via Maven to simulate a note-taking app. The app contains 5 RESTful API endpoints for creating, retrieving, updating and deleting a note.
- You have Java and Maven installed on your local machine.
- Both Java and Maven home directories have been added as environment variables.
- You have Postman installed.
- Install all dependencies by running the following command on the root directory of the project: mvn clean install -DskipTests
- If you have an IDE, open it and run/debug src/main/java/ph/com/ota/notes/api/NotesApiApplication.java
- If you don't have an IDE, open a terminal e.g. Bash then run the following command: mvn spring-boot:run
- Open Postman, the base URL should be at http://localhost:8080/api
- To create a new note, create a POST request and append the endpoint /notes to the base URL. The body should be a JSON containing 2 fields "title" (required) and "body".
- To retrieve all notes, create a GET request and append the endpoint /notes to the base URL. If you want to retrieve only a single note, further append an ID e.g. /notes/1.
- To update a note, create a PUT request and append the endpoint /notes to the base URL. The body should be a JSON containing 2 fields "title" (required) and "body".
- To delete a note, create a DELETE request and append the endpoint /notes/:id to the base URL, where :id is the ID of a note.
This project was intended to be as bare and simple as possible, so data is stored in-memory and isn't persistent. This means that once the application terminates or shuts down, all data will be erased. API documentation should also be done ideally via OpenAPI or Swagger and not via a README.