Spring Boot application to create the backend for the basic Task Manager application.
- Java (recommended: Java 17+)
- Spring Boot
- Maven
- JDK 17+ installed
- Maven 3.6+
- Git
- Docker (using PostGreSQL Image for dB)
com.example.task Spring Boot app (single service) Client/API Consumer -> HTTP -> Controller -> Service -> Repository -> Database
- Application
- Spring Boot entrypoint:
com.example.task.TaskApplication - Runs as a standalone JAR or via
mvn spring-boot:run
- Spring Boot entrypoint:
- Presentation
- REST Controllers handle HTTP requests and return DTOs
- Business Logic
- Service layer implements use-cases and orchestrates repositories and external calls
- Persistence
- Repository layer (Spring Data JPA or manual DAOs) persists
Entityobjects to a relational DB (e.g., PostgreSQL) - Relevant code in
src/main/java/com/example/task/...
- Repository layer (Spring Data JPA or manual DAOs) persists
- Configuration
src/main/resources/application.propertiesorapplication.ymlmanages profiles, ports, DB URLs and credentials
- Integration
- External HTTP APIs, message brokers, or caches are invoked from the service layer via client components
- Client sends HTTP request to Controller.
- Controller validates input and maps to domain DTOs.
- Controller calls Service to perform business logic.
- Service invokes Repository for persistence or external clients for integrations.
- Repository returns entities; Service maps results to DTOs.
- Controller returns HTTP response.
- Main package:
com.example.task - Source layout:
src/main/java/com/example/task/... - Config & resources:
src/main/resources/application.properties(orapplication.yml) - Tests:
src/test/java/...
- Build:
mvn clean package - Run (dev):
mvn spring-boot:runorjava -jar target/*.jar - Optional container: Docker image built from the generated JAR