RESTful API that allows users to create, retrieve, update, and delete notes.
Each note can consist of a title and a body
This document provides a quick guide to setting up and using this Spring Boot API project.
- Java Development Kit (JDK) 8 or later (https://www.oracle.com/java/technologies/downloads/)
- Maven or Gradle build tool (This guide uses Maven) (https://maven.apache.org/download.cgi)
- Integrated Development Environment (IDE) (Optional - IntelliJ IDEA, Eclipse, etc.)
Clone the project:
git clone https://github.com/ctpantoja-dev/notes-service.git
Navigate to the project directory:
cd <directory_to_notes_service>
Install dependencies:
mvn install
Start the application:
mvn spring-boot:run
This will start the application on the default port (usually 8080).
- The application exposes a RESTful API.
- You can interact with the API using tools like Postman or curl.
- Refer to the source code for specific API endpoints and their functionalities.
curl -X GET http://localhost:8080/notes/<note id>
curl -X GET http://localhost:8080/notes
curl -X POST http://localhost:8080/notes -H "Content-Type: application/json" -d '{"title":"Test Title", "body": "Test Body"}'
curl -X PUT http://localhost:8080/notes/<note id> -H "Content-Type: application/json" -d '{"title":"Updated Title", "body": "Updated Body"}'
curl -X DELETE http://localhost:8080/notes/<note id>