This is a simple Task Manager application built with Spring Boot. It allows you to create, read, update, and delete tasks, as well as check the code coverage of the application.
Spring Boot is an open-source Java-based framework used to create stand-alone, production-grade Spring-based applications. It simplifies the development of new Spring applications and helps you create robust, scalable applications with minimal configuration.
- Java 21 or higher
- Maven 3.6.0 or higher
- An IDE such as IntelliJ IDEA or VS Code
- Postman (for testing the API)
- H2 Database (in-memory database used for this application)
-
Build the project using Maven:
mvn clean install
-
Run the application:
mvn spring-boot:run
The application will start on http://localhost:8080
Start Postman and create a new request.
- Create a new task:
-
Method: POST
-
Body: Select raw and JSON format, then provide the task details:
{ "title": "Task 1", "description": "Description 1", "status": "pending", "dueDate": "2024-06-30" } -
Send the request.
- Retrieve all tasks:
- Method: GET
- URL: http://localhost:8080/api/tasks
- Send the request to get the list of all tasks.
- Retrieve a task by ID:
- Method: GET
- URL: http://localhost:8080/api/tasks/{id} (replace {id} with the actual task ID)
- Send the request to get the task details.
- Update a task:
-
Method: PUT
-
URL: http://localhost:8080/api/tasks/{id} (replace {id} with the actual task ID)
-
Body: Select raw and JSON format, then provide the updated task details:
{ "title": "Updated Task 1", "description": "Updated Description 1", "status": "completed", "dueDate": "2024-07-01" } -
Send the request.
- Delete a task:
- Method: DELETE
- URL: http://localhost:8080/api/tasks/{id} (replace {id} with the actual task ID)
- Send the request to delete the task.