A simple RESTful API for managing tasks (Todo list), built with Spring Boot, Spring Data JPA, and H2 database.
- Create, Read, Update, Delete (CRUD) tasks
- RESTful endpoints using Spring Web
- In-memory H2 database (no setup needed)
- JPA & Hibernate integration
- Java 17+
- Spring Boot 3.3.x
- Spring Web
- Spring Data JPA
- H2 Database
GET /tasksGET /tasks/{id}POST /tasks
Content-Type: application/json
{
"title": "Finish project",
"description": "Build REST API",
"completed": false
}PUT /tasks/{id}
Content-Type: application/json
{
"title": "Updated title",
"description": "New description",
"completed": true
}DELETE /tasks/{id}git clone https://github.com/DolevAtik/spring-boot-task-api.git
cd spring-boot-task-apiYou can run the app from your IDE (IntelliJ recommended) or with Maven:
./mvnw spring-boot:runhttp://localhost:8080/tasks
- Uses in-memory database (H2) — data resets on restart
- You can view the H2 console at:
http://localhost:8080/h2-console
Use jdbc:h2:mem:testdb as the JDBC URL
This project is open-source and free to use.