A REST API application built with Java and Spring Boot for managing tasks.
- CRUD operations for tasks
- H2 in-memory database
- RESTful API endpoints
- JPA for data persistence
- GET
/api/tasks- Get all tasks - GET
/api/tasks/{id}- Get a specific task - POST
/api/tasks- Create a new task - PUT
/api/tasks/{id}- Update an existing task - DELETE
/api/tasks/{id}- Delete a task
- Ensure you have Java 21 installed
- Run
mvn spring-boot:run - The application will start on port 8080
- Access the H2 console at
http://localhost:8080/h2-console
# Create a new task
curl -X POST http://localhost:8080/api/tasks \
-H "Content-Type: application/json" \
-d '{
"title": "Complete project",
"description": "Finish the Spring Boot project",
"completed": false
}'