Prerequisites
Before you begin, ensure you have the following installed:Java 21
Required for running the Spring Boot application
PostgreSQL
Database for persistent storage
Git
For cloning the repository
Docker (Optional)
For containerized deployment
This project uses Java 21 as specified in
build.gradle. Make sure you have the correct version installed.Installation Steps
Set Up PostgreSQL Database
Create a PostgreSQL database for the application:The application will automatically run Flyway migrations on startup to create the required tables.
Build the Project
Use the Gradle wrapper to build the project:This command will:
- Download all dependencies
- Compile the source code
- Run all tests
- Generate the JAR file in
build/libs/
The first build may take a few minutes as Gradle downloads dependencies.
Run the Application
Start the application using Gradle:Or run the JAR directly:The application will start on
http://localhost:8080 by default.IDE Setup
IntelliJ IDEA
- Open IntelliJ IDEA and select File > Open
- Navigate to the cloned repository and select the root folder
- IntelliJ will automatically detect the Gradle project and import it
- Wait for dependency resolution to complete
- Enable annotation processing: Settings > Build, Execution, Deployment > Compiler > Annotation Processors and check “Enable annotation processing”
The project uses Lombok and MapStruct annotation processors. Make sure annotation processing is enabled in your IDE.
Eclipse
- Open Eclipse and select File > Import > Gradle > Existing Gradle Project
- Browse to the cloned repository and click Finish
- Eclipse will import the project and download dependencies
- Install the Lombok plugin: Download
lombok.jarfrom projectlombok.org and run it
VS Code
- Open VS Code and install the following extensions:
- Extension Pack for Java
- Spring Boot Extension Pack
- Lombok Annotations Support
- Open the project folder: File > Open Folder
- VS Code will automatically detect the Gradle project
Next Steps
Now that you have the application installed, you can:Configuration
Learn how to configure the application
API Reference
Explore the API endpoints
Docker Setup
Run the application in Docker
Testing
Learn about the testing strategy
Accessing API Documentation
Once the application is running, you can access interactive API documentation:- Swagger UI: http://localhost:8080/swagger-ui/index.html
- OpenAPI JSON: http://localhost:8080/api-docs
Troubleshooting
Port 8080 already in use
Port 8080 already in use
If port 8080 is already in use, you can change it by setting the Or set it in
server.port property:application-local.yaml:Database connection failed
Database connection failed
Ensure PostgreSQL is running and the database
user_db exists. Verify your connection settings in application.yaml:Java version mismatch
Java version mismatch
This project requires Java 21. Check your Java version:If you have multiple Java versions, set
JAVA_HOME to point to Java 21:Lombok not working in IDE
Lombok not working in IDE
If Lombok annotations are not being processed:
- Ensure the Lombok plugin is installed in your IDE
- Enable annotation processing in IDE settings
- Invalidate caches and restart the IDE