This project is a Spring Boot application designed for task management. It allows users to create, update, delete, and view tasks efficiently with a robust and scalable backend.
- Task Management: CRUD operations for tasks (Create, Read, Update, Delete).
- User Authentication: Secure login and registration for users.
- Scheduling: Schedule tasks using Spring's
@Scheduledannotations. - RESTful API: Provides endpoints for integrating with other systems.
- Database Integration: Supports popular databases like MySQL, PostgreSQL, or H2 (for development).
- Java 17
- Spring Boot 3.x
- Spring Data JPA
- Spring Security
- H2 Database (development) or MySQL/PostgreSQL (production)
- Maven (for dependency management)
- JDK 17 or higher
- Maven
- Database (H2, MySQL, PostgreSQL)
-
Clone the repository:
git clone https://github.com/yourusername/springboot-tasker.git cd springboot-tasker -
Configure the database:
- Open
src/main/resources/application.properties(orapplication.yml). - Set your database configuration:
spring.datasource.url=jdbc:mysql://localhost:3306/tasker spring.datasource.username=your_username spring.datasource.password=your_password spring.jpa.hibernate.ddl-auto=update
- Open
-
Build the project:
mvn clean install
-
Run the application:
mvn spring-boot:run
-
Access the application:
- API Documentation:
http://localhost:8080/swagger-ui.html - H2 Console (if using H2):
http://localhost:8080/h2-console
- API Documentation:
- GET /tasks: Retrieve all tasks.
- POST /tasks: Create a new task.
- PUT /tasks/{id}: Update an existing task.
- DELETE /tasks/{id}: Delete a task.
- POST /auth/register: Register a new user.
- POST /auth/login: Authenticate and retrieve a JWT token.
Create a new task:
curl -X POST \
http://localhost:8080/tasks \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <JWT_TOKEN>' \
-d '{
"title": "Write documentation",
"description": "Complete the README.md file",
"dueDate": "2025-01-25"
}'This project is licensed under the MIT License.
For any questions or issues, please open an issue.