A simple RESTful API built with Spring Boot for creating, reading, updating, and deleting notes.
- Built with Spring Boot, Spring Data JPA, and PostgreSQL.
- RESTful endpoints with proper HTTP status codes.
- Simple CRUD operations for notes.
Clone the repository and install dependencies:
mvn clean installmvn spring-boot:run # Development
mvn package # ProductionThe server runs on http://localhost:8080
GET /notes
Response:
[
{
"id": 1,
"title": "My Note",
"content": "This is my note content"
}
]GET /notes/{id}
Example:
GET /notes/1
Response:
{
"id": 1,
"title": "My Note",
"content": "This is my note content"
}POST /notes
Request Body:
{
"title": "New Note",
"content": "Note content here"
}Response:
{
"id": 1,
"title": "New Note",
"content": "Note content here"
}PUT /notes/{id}
Example:
PUT /notes/1
Request Body:
{
"title": "Updated Title",
"content": "Updated content"
}Response:
{
"id": 1,
"title": "Updated Title",
"content": "Updated content"
}DELETE /notes/{id}
Example:
DELETE /notes/1
Response: 204 No Content