Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Spring Boot Task API

A simple RESTful API for managing tasks (Todo list), built with Spring Boot, Spring Data JPA, and H2 database.

🚀 Features

  • Create, Read, Update, Delete (CRUD) tasks
  • RESTful endpoints using Spring Web
  • In-memory H2 database (no setup needed)
  • JPA & Hibernate integration

📦 Tech Stack

  • Java 17+
  • Spring Boot 3.3.x
  • Spring Web
  • Spring Data JPA
  • H2 Database

🛠️ Endpoints

Get all tasks

GET /tasks

Get task by ID

GET /tasks/{id}

Create a task

POST /tasks
Content-Type: application/json

{
  "title": "Finish project",
  "description": "Build REST API",
  "completed": false
}

Update a task

PUT /tasks/{id}
Content-Type: application/json

{
  "title": "Updated title",
  "description": "New description",
  "completed": true
}

Delete a task

DELETE /tasks/{id}

▶️ Getting Started

Clone the repo

git clone https://github.com/DolevAtik/spring-boot-task-api.git
cd spring-boot-task-api

Run the app

You can run the app from your IDE (IntelliJ recommended) or with Maven:

./mvnw spring-boot:run

Access the API

http://localhost:8080/tasks

🧠 Notes

  • 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

📄 License

This project is open-source and free to use.

About

Simple task manager REST API using Spring Boot

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages