Getting Started๏
Prerequisites๏
Tool |
Minimum Version |
|---|---|
Java (JDK) |
17 |
Maven |
3.9 |
MySQL |
8.0 |
Docker & Docker Compose |
24+ (optional) |
Database Setup๏
mysql -u root -p < src/main/resources/dbsetup.sql
Then update src/main/resources/application.properties with your database credentials:
spring.datasource.url=jdbc:mysql://localhost:3306/libraryapidb
spring.datasource.username=<your_user>
spring.datasource.password=<your_password>
Running the Application๏
# Build and run (all checks)
mvn clean install
mvn spring-boot:run
# Skip tests for a fast start
mvn -DskipTests spring-boot:run
Access points once running:
Endpoint |
URL |
|---|---|
Frontend UI |
http://localhost:8080 |
Swagger UI |
http://localhost:8080/swagger-ui.html |
OpenAPI JSON |
http://localhost:8080/v3/api-docs |
Running with Docker๏
# Start all services (app + MySQL)
docker-compose up
# Rebuild after Dockerfile changes
docker-compose up --build
Quick Reference: Maven Commands๏
Goal |
Command |
|---|---|
Unit tests |
|
Integration tests |
|
Performance tests |
|
JaCoCo coverage report |
|
Full Maven site |
|
Publish docs to |
|
Build Sphinx docs |
|