The Task Management API is a RESTful API designed for managing tasks effectively. This project leverages modern tools and frameworks to ensure robust functionality and ease of deployment.
- RESTful API: Built with Java and Spring Boot for efficient task management.
- Database Integration: Uses MySQL for reliable and persistent data storage.
- Containerization: Dockerized for seamless deployment and scalability.
- Testing: Core functionality is implemented and tested using JUnit to ensure high code quality.
- Java
- Spring Boot
- MySQL
- Docker
- JUnit
To get started with the Task Management API, follow the steps below:
-
Clone the repository:
git clone https://github.com/antonkazachenko/taskmanagment.git cd taskmanagment
-
Set up MySQL:
- Create a database for the API.
- Update the database configuration in
application.properties
.
-
Build and run the application:
./mvnw spring-boot:run
-
Use Docker (Optional):
- Build the Docker image:
docker build -t task-management-api .
- Run the container:
docker run -p 8080:8080 task-management-api
- Build the Docker image:
The API provides the following endpoints for task management:
-
GET /api/tasks
- Retrieve all tasks with pagination and sorting.
- Query Parameters:
page
(default: 0) - Page number.size
(default: 10) - Number of tasks per page.sortBy
(default: "id") - Field to sort by.
-
POST /api/tasks
- Create a new task.
- Request Body:
- JSON object containing task details.
-
PUT /api/tasks/{id}
- Update an existing task.
- Path Variable:
id
- ID of the task to update.
- Request Body:
- JSON object containing updated task details.
-
DELETE /api/tasks/{id}
- Delete an existing task.
- Path Variable:
id
- ID of the task to delete.
-
GET /api/tasks/search
- Search tasks by query string.
- Query Parameters:
query
- The search keyword.