A comprehensive Spring Boot REST API application for managing product returns, non-conformities, and return history with JWT authentication, role-based access control, pagination, filtering, and extensive seed data for testing.
Gestion Retours is an enterprise-grade product returns management system designed for delivery and logistics companies to track, manage, and analyze product returns efficiently.
- Backend: Spring Boot 3.3.0 with Java 17
- Database: MySQL 8
- Authentication: JWT (JSON Web Tokens)
- API Documentation: Swagger UI (SpringDoc OpenAPI)
- ORM: JPA/Hibernate with Lombok
- Build Tool: Maven
- Architecture: REST API with Service-Repository pattern
- User Registration & Login - Secure JWT token-based authentication
- Role-Based Access Control - ADMIN, MANAGER, USER, EMPLOYEE roles
- Password Security - BCrypt password hashing
- Bearer Token Support - JWT authentication in Swagger UI
- Endpoint Authorization - Fine-grained access control on all endpoints
- Default Admin - Auto-created admin account on startup
- Email:
admin@delivery.com - Password:
admin
- Email:
- Complete CRUD Operations - Create, read, update, delete returns
- Status Tracking - 8 treatment states (EN_ATTENTE, EN_COURS, ACCEPTE, REJETEE, etc.)
- Advanced Filtering - Filter by client, product, status, date
- Pagination Support - Configurable page size and navigation
- Validation - Comprehensive field validation with error messages
- Data Transformation - Request/Response DTOs for clean API contracts
- 50+ Test Returns - Realistic seed data included
- Record Non-Conformities - Document quality issues with returns
- Severity Tracking - 4 severity levels (FAIBLE, MOYEN, GRAVE, CRITIQUE)
- Link to Returns - Associate non-conformities with specific returns
- Advanced Filtering - Filter by product name and severity
- Pagination - Efficiently handle large datasets
- 50+ Test Records - Comprehensive seed data
- Action Logging - Record all actions taken on returns
- Employee Tracking - Track which employee performed each action
- Timestamp Recording - Automatic timestamp on each entry
- History Retrieval - Get complete history for any return
- Audit Compliance - Full audit trail for regulatory compliance
- 10 Seed Records - Default history entries for testing
- Admin User Management - Create and manage user accounts
- User Filtering - Filter by name, email, role, status with pagination
- Get All Users Simple - New lightweight endpoint to get all users (id, nom, role) β NEW
- Profile Access - Users can view their own profile
- Status Control - Enable/disable user accounts
- 5 Test Users - Pre-configured with different roles
- β New Endpoint:
/users/all- Get all users in simplified format (id, nom, role) without pagination - β New DTO:
UserSimpleResponse- Lightweight user response for list operations - β Return History Fixes: Corrected create, patch, and update operations to properly load relationships
- Fixed validation errors in Return History creation by properly loading
retourandemployeentities - Enhanced
patchWithRelations()andupdateWithRelations()methods for better error handling - Improved data consistency in history management
- Total Endpoints: 30 (was 29)
- User Management: 7 endpoints (was 6)
- Interactive Swagger UI - Test all endpoints directly from browser
- OpenAPI 3.0 Spec - Machine-readable API specification
- Bearer Token Support - Authenticate in Swagger UI
- Comprehensive Descriptions - Detailed endpoint documentation
The application automatically initializes comprehensive test data on first startup:
β
Total Users: 5
β’ 1 ADMIN (admin@delivery.com / admin)
β’ 2 MANAGER accounts
β’ 2 USER accounts
β
Product Returns: 50
β’ Various clients and products
β’ Different treatment states
β’ Spread across last 30 days
β
Non-Conformities: 50
β’ Linked to returns
β’ Various severity levels
β’ Realistic descriptions
β
Return History: 10 β NEW
β’ Linked to returns
β’ Different employees
β’ Various actions performed
β’ Realistic timestamps
β
TOTAL RECORDS: 115
| Role | Password | |
|---|---|---|
| ADMIN | admin@delivery.com | admin |
| MANAGER | manager1@delivery.com | manager123 |
| MANAGER | manager2@delivery.com | manager123 |
| USER | user1@delivery.com | user123 |
| USER | user2@delivery.com | user123 |
- Java 17 or higher
- Maven 3.8+
- MySQL 8.0+
- Clone the repository
git clone <repository-url>
cd gestion-retours- Configure database - Update
src/main/resources/application.properties:
spring.datasource.url=jdbc:mysql://localhost:3306/gestion_retours
spring.datasource.username=root
spring.datasource.password=your_password
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.jpa.hibernate.ddl-auto=create-drop
spring.jpa.show-sql=false- Build the project
mvn clean install- Run the application
mvn spring-boot:run- Access the application
- API Base URL:
http://localhost:8080/api/v1 - Swagger UI:
http://localhost:8080/swagger-ui.html - OpenAPI Spec:
http://localhost:8080/v3/api-docs
POST /api/v1/auth/login
Content-Type: application/json
{
"email": "admin@delivery.com",
"password": "admin"
}{
"success": true,
"message": "Connexion rΓ©ussie",
"data": {
"token": "eyJhbGc...",
"email": "admin@delivery.com",
"role": "ADMIN"
}
}Authorization: Bearer <your_token_here>| Method | Endpoint | Description |
|---|---|---|
| POST | /auth/register |
Register new user |
| POST | /auth/login |
Login and get JWT token |
| Method | Endpoint | Role | Description |
|---|---|---|---|
| POST | /retours/create |
ADMIN, MANAGER | Create new return |
| GET | /retours |
ADMIN, MANAGER, USER | Get returns with filters & pagination |
| GET | /retours/all |
ADMIN, MANAGER, USER | Get all returns without pagination |
| GET | /retours/{id} |
ADMIN, MANAGER, USER | Get return by ID |
| PATCH | /retours/patch/{id} |
ADMIN, MANAGER | Partial update return |
| PUT | /retours/update/{id} |
ADMIN, MANAGER | Full update return |
| DELETE | /retours/delete/{id} |
ADMIN, MANAGER | Delete return |
| Method | Endpoint | Role | Description |
|---|---|---|---|
| POST | /non-conformites/{produitId} |
ADMIN, MANAGER | Create non-conformity |
| GET | /non-conformites |
ADMIN, MANAGER, USER | Get non-conformities with filters |
| GET | /non-conformites/{id} |
ADMIN, MANAGER, USER | Get non-conformity by ID |
| PATCH | /non-conformites/patch/{id} |
ADMIN, MANAGER | Partial update |
| PUT | /non-conformites/update/{id} |
ADMIN, MANAGER | Full update |
| DELETE | /non-conformites/delete/{id} |
ADMIN, MANAGER | Delete |
| Method | Endpoint | Role | Description |
|---|---|---|---|
| POST | /historique-retours/create |
ADMIN, MANAGER | Create history record |
| GET | /historique-retours |
ADMIN, MANAGER, USER | Get all history records |
| GET | /historique-retours/{id} |
ADMIN, MANAGER, USER | Get history by ID |
| GET | /historique-retours/retour/{retourId} |
ADMIN, MANAGER, USER | Get history for specific return |
| PATCH | /historique-retours/patch/{id} |
ADMIN, MANAGER | Partial update history β FIXED |
| PUT | /historique-retours/update/{id} |
ADMIN, MANAGER | Full update history β FIXED |
| DELETE | /historique-retours/delete/{id} |
ADMIN, MANAGER | Delete history record |
Important: The create, patch, and update endpoints now properly load related entities (retour and employe) from the database using their IDs to prevent validation errors.
| Method | Endpoint | Role | Description |
|---|---|---|---|
| POST | /users/create |
ADMIN | Create new user |
| GET | /users |
ADMIN | Get users with filters & pagination |
| GET | /users/all |
ADMIN | Get all users (id, nom, role) without pagination β NEW |
| GET | /users/me |
All | Get current user profile |
| GET | /users/{id} |
ADMIN | Get user by ID |
| PUT | /users/update/{id} |
ADMIN | Update user |
| DELETE | /users/delete/{id} |
ADMIN | Delete user |
All list endpoints support pagination:
Request:
GET /retours?page=2&size=20Response includes EdgeInfo:
{
"success": true,
"data": [...],
"edgeInfo": {
"hasNext": true,
"hasPrevious": true,
"totalItems": 150,
"currentPage": 2
}
}GET /api/v1/retours?client=Ahmed&produit=iPhone&etatTraitement=EN_ATTENTE&page=1&size=10GET /api/v1/users?nom=Ahmed&email=example.com&role=MANAGER&enabled=true&page=1&size=10GET /api/v1/non-conformites?produit=iPhone&gravite=GRAVE&page=1&size=10LoginRequest- User login credentialsRegisterRequest- User registrationAdminCreateUserRequest- Admin user creationUpdateUserRequest- User updateRetourProduitCreateRequest- Return creation βRetourProduitUpdateRequest- Return update βHistoriqueRetourCreateRequest- History creation βHistoriqueRetourUpdateRequest- History update βNonConformiteCreateRequest- Non-conformity creation βNonConformiteUpdateRequest- Non-conformity update β
AuthResponse- Authentication responseUserResponse- User data (full details)UserSimpleResponse- User data (id, nom, role only) β NEWRetourProduitResponse- Return data βHistoriqueRetourResponse- History data βNonConformiteResponse- Non-conformity data β
CREATE TABLE users (
id UUID PRIMARY KEY,
nom VARCHAR(255) NOT NULL,
email VARCHAR(255) UNIQUE NOT NULL,
password VARCHAR(255) NOT NULL,
role VARCHAR(50) NOT NULL,
enabled BOOLEAN DEFAULT true
);CREATE TABLE retours (
id BIGINT PRIMARY KEY AUTO_INCREMENT,
produit VARCHAR(100) NOT NULL,
client VARCHAR(50) NOT NULL,
raison VARCHAR(500),
etat_traitement VARCHAR(50) NOT NULL,
date DATE NOT NULL
);CREATE TABLE non_conformites (
id BIGINT PRIMARY KEY AUTO_INCREMENT,
description VARCHAR(500) NOT NULL,
gravite VARCHAR(50) NOT NULL,
date DATETIME NOT NULL,
produit_id BIGINT NOT NULL,
FOREIGN KEY (produit_id) REFERENCES retours(id)
);CREATE TABLE historique_retours (
id BIGINT PRIMARY KEY AUTO_INCREMENT,
retour_id BIGINT NOT NULL,
action VARCHAR(500) NOT NULL,
employee_id UUID NOT NULL,
date DATETIME NOT NULL,
FOREIGN KEY (retour_id) REFERENCES retours(id),
FOREIGN KEY (employee_id) REFERENCES users(id)
);curl -X POST http://localhost:8080/api/v1/retours/create \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"produit": "iPhone 14",
"client": "Ahmed Smith",
"raison": "Device malfunctioning after 2 weeks",
"etatTraitement": "EN_ATTENTE",
"date": "2026-04-08"
}'curl -X GET "http://localhost:8080/api/v1/retours?client=Ahmed&page=1&size=10" \
-H "Authorization: Bearer <token>"curl -X POST http://localhost:8080/api/v1/historique-retours/create \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"retourId": 1,
"action": "Product inspected and approved for replacement",
"employeId": "uuid-of-employee"
}'curl -X GET "http://localhost:8080/api/v1/historique-retours/retour/1" \
-H "Authorization: Bearer <token>"curl -X GET "http://localhost:8080/api/v1/users/all" \
-H "Authorization: Bearer <token>"Response format:
{
"success": true,
"message": "Liste de tous les utilisateurs",
"data": [
{
"id": "uuid-123",
"nom": "Manager User",
"role": "MANAGER"
},
{
"id": "uuid-456",
"nom": "Admin User",
"role": "ADMIN"
}
]
}gestion-retours/
βββ src/main/java/com/example/gestionretours/
β βββ config/
β β βββ ApiConfig.java # OpenAPI & CORS configuration
β β βββ SecurityConfig.java # JWT security setup
β β βββ DataInitializer.java # Seed data initialization
β β βββ ApiResponse.java # Standard response wrapper
β β βββ PaginatedResponse.java # Pagination response
β βββ controllers/
β β βββ AuthController.java
β β βββ UserController.java
β β βββ RetourProductController.java
β β βββ HistoriqueRetourController.java β
β β βββ NonConformiteController.java
β β βββ UserFilter.java # Filter class
β β βββ RetourFilter.java # Filter class
β β βββ NonConformiteFilter.java # Filter class
β βββ services/
β β βββ AuthService.java
β β βββ UserService.java
β β βββ RetourProduitService.java
β β βββ HistoriqueRetourService.java β
β β βββ NonConformiteService.java
β βββ repos/
β β βββ UserRepository.java
β β βββ RetourProduitRepository.java
β β βββ HistoriqueRetourRepository.java β
β β βββ NonConformiteRepository.java
β βββ entites/
β β βββ User.java
β β βββ RetourProduit.java
β β βββ HistoriqueRetour.java β
β β βββ NonConformite.java
β β βββ Role.java
β β βββ EtatTraitement.java
β β βββ Gravite.java
β βββ dto/
β β βββ (10+ Request DTOs)
β β βββ (5+ Response DTOs)
β βββ exceptions/
β βββ security/
βββ pom.xml
| Role | Permissions |
|---|---|
| ADMIN | Full access to all endpoints, user management |
| MANAGER | Create/manage returns, non-conformities, history; view data |
| USER | Read-only access to returns, non-conformities, history |
| EMPLOYEE | Limited access to return data and history |
- β JWT token-based authentication
- β Password hashing with BCrypt
- β Role-based endpoint authorization
- β Input validation on all endpoints
- β CORS configuration for secure cross-origin requests
- β Bearer token support in Swagger UI
- β HTTP-only secure tokens
The application logs all initialization steps:
β Default admin user created: admin@delivery.com / admin
π± Initializing seed data...
β Manager created: manager1@delivery.com
β Manager created: manager2@delivery.com
β User created: user1@delivery.com
β User created: user2@delivery.com
β 50 Product Returns created
β 50 Non-Conformities created
β 10 Return History records created β
β
Seed data initialization completed!
All errors return consistent JSON format:
{
"success": false,
"message": "Error description",
"data": null
}- Swagger UI: http://localhost:8080/swagger-ui.html
- OpenAPI Spec: http://localhost:8080/v3/api-docs
- GitHub: [Repository URL]
- Documentation: See individual endpoint documentation in Swagger
For issues or questions, contact: support@delivery.com
Version: 1.0.1
Last Updated: April 10, 2026 β UPDATED
Status: β
Production Ready
β βββ services/ # Business logic layer
β βββ repos/ # Data access layer
β βββ entites/ # JPA entity models
β βββ dto/ # Data Transfer Objects
β βββ config/
β β βββ DataInitializer.java # π± Seed data generator
β β βββ SecurityConfig.java # Security configuration
β β βββ ApiConfig.java # API & Swagger config
β β βββ GlobalExceptionHandler.java
β βββ security/ # JWT & security utilities
β βββ exceptions/ # Custom exceptions
βββ src/main/resources/
β βββ application.properties
βββ π Documentation/
β βββ README.md (this file)
β βββ QUICK_START.md # β Start here
β βββ TEST_USERS_REFERENCE.md # Copy-paste credentials
β βββ SEED_DATA_GUIDE.md # Complete guide
β βββ IMPLEMENTATION_GUIDE.md # Technical details
β βββ DOCUMENTATION_INDEX.md # Guide index
βββ Dockerfile
βββ docker-compose.yml
βββ pom.xml
## Prerequisites
### For Local Development
- Java 17 or higher
- Maven 3.9.1 or higher
- MySQL 8
- Git
### For Docker Development
- Docker Desktop (or Docker Engine)
- Docker Compose
## Getting Started
### β Quick Start (3 Steps)
#### Step 1: Start Application
```bash
cd C:\Users\Laith PC\IdeaProjects\gestion-retours
./mvnw spring-boot:run
http://localhost:8080/swagger-ui.html
- Email:
manager1@delivery.com - Password:
manager123 - Get JWT token and click "Authorize" button
-
Clone the repository
git clone https://github.com/LaithMahdi/gestion-retours-backend cd gestion-retours -
Start all services
docker-compose up -d
This will:
- Start MySQL database on port 3306
- Build and start Spring Boot application on port 8080
- Start phpMyAdmin on port 8088
- Create
gestion_retourdatabase automatically - Initialize seed data
-
Wait for services to be healthy
docker-compose logs -f retour-app
-
Access the application
- API: http://localhost:8080
- Swagger UI: http://localhost:8080/swagger-ui.html
- phpMyAdmin: http://localhost:8088
- Username:
root - Password:
root
- Username:
-
Stop services
docker-compose down
-
Setup MySQL Database
mysql -u root -p
CREATE DATABASE gestion_retour CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-
Configure application.properties
Edit
src/main/resources/application.properties:spring.datasource.url=jdbc:mysql://localhost:3306/gestion_retour?createDatabaseIfNotExist=true&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC spring.datasource.username=root spring.datasource.password=your_mysql_password
-
Build the project
mvn clean package
-
Run the application
mvn spring-boot:run
-
Access the application
- API: http://localhost:8080
- Swagger UI: http://localhost:8080/swagger-ui.html
All endpoints except authentication are protected with JWT authentication and role-based access control.
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/auth/register |
Register a new user |
| POST | /api/v1/auth/login |
Login and get JWT token |
| Method | Endpoint | Permissions |
|---|---|---|
| POST | /api/v1/retours/create |
ADMIN, MANAGER |
| PATCH | /api/v1/retours/patch/{id} |
ADMIN, MANAGER |
| PUT | /api/v1/retours/update/{id} |
ADMIN, MANAGER |
| GET | /api/v1/retours |
ADMIN, MANAGER, USER |
| GET | /api/v1/retours/{id} |
ADMIN, MANAGER, USER |
| DELETE | /api/v1/retours/delete/{id} |
ADMIN, MANAGER |
| Method | Endpoint | Permissions |
|---|---|---|
| POST | /api/v1/non-conformites/{produitId} |
ADMIN, MANAGER, USER |
| PATCH | /api/v1/non-conformites/patch/{id} |
ADMIN, MANAGER |
| PUT | /api/v1/non-conformites/update/{id} |
ADMIN, MANAGER |
| GET | /api/v1/non-conformites |
ADMIN, MANAGER, USER |
| GET | /api/v1/non-conformites/{id} |
ADMIN, MANAGER, USER |
| DELETE | /api/v1/non-conformites/delete/{id} |
ADMIN, MANAGER |
| Method | Endpoint | Permissions |
|---|---|---|
| GET | /api/v1/users/me |
ADMIN, MANAGER, USER |
| POST | /api/v1/users/create |
ADMIN |
| GET | /api/v1/users |
ADMIN |
| GET | /api/v1/users/{id} |
ADMIN |
| PUT | /api/v1/users/update/{id} |
ADMIN |
| DELETE | /api/v1/users/delete/{id} |
ADMIN |
| GET | /api/v1/users/role/{role} |
ADMIN |
| GET | /api/v1/users/search?nom={name} |
ADMIN |
- β View and manage all users
- β Full CRUD on returns and non-conformities
- β Can edit and delete other user's records
- β Create returns and non-conformities
- β Edit and delete returns and non-conformities
- β Cannot manage users
- β Create returns and non-conformities
- β View all returns and non-conformities
- β Cannot edit or delete records
- β Cannot manage users
-
Login to get token
curl -X POST "http://localhost:8080/api/v1/auth/login" \ -H "Content-Type: application/json" \ -d '{ "email": "manager1@delivery.com", "password": "manager123" }'
-
Use token in requests
curl -X GET "http://localhost:8080/api/v1/retours" \ -H "Authorization: Bearer YOUR_JWT_TOKEN"
-
In Swagger UI
- Click "Authorize" button (top right)
- Paste token (auto-adds "Bearer" prefix)
- All endpoints now include token automatically
The application automatically initializes realistic test data on startup:
- Runs once on first startup via
DataInitializer.java - Creates 5 test users with different roles
- Creates 50 product returns with varied data
- Creates 50 non-conformities with severity levels
- Idempotent - won't duplicate on restart
Sample Products: Laptop Dell XPS, iPhone 14 Pro, Samsung Galaxy S23, AirPods Pro, iPad Air, etc.
Sample Clients: Acme Corporation, Tech Solutions Ltd, Digital Innovations Inc, Global Trading Co, etc.
Return States:
- EN_ATTENTE (Pending)
- APPROUVE (Approved)
- REFUSE (Refused)
- REMBOURSE (Refunded)
- ECHANGE (Exchanged)
- EN_COURS_VERIFICATION (In verification)
- REMBOURSEMENT_EN_ATTENTE (Refund pending)
- PRODUIT_RECU (Product received)
Severity Levels:
- FAIBLE (Low)
- MOYENNE (Medium)
- ELEVEE (High)
- CRITIQUE (Critical)
Edit src/main/resources/application.properties:
# JWT Settings
jwt.secret=YwNIcAXJfzYhoxHIvFkBpssU6z6e73cPtXR1VYc8Kit
jwt.expiration=86400000 # 24 hours in milliseconds
# Database
spring.datasource.url=jdbc:mysql://localhost:3306/gestion_retour?createDatabaseIfNotExist=true&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC
spring.datasource.username=root
spring.datasource.password=
# JPA/Hibernate
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=trueSolution: This is expected! The API is secured.
- Use Swagger UI: http://localhost:8080/swagger-ui.html
- Login with test credentials to get JWT token
- Click "Authorize" in Swagger and paste token
- Check application logs for initialization messages
- Verify database is properly connected
- Ensure
spring.jpa.hibernate.ddl-auto=update(or create)
- Verify MySQL is running:
mysql -u root -p - Check connection string in
application.properties - For Docker: ensure MySQL container is running:
docker-compose ps
- Change port in
application.properties:server.port=8081 - Or stop the conflicting service
POST /api/v1/auth/login
{
"email": "manager1@delivery.com",
"password": "manager123"
}POST /api/v1/retours/create
Authorization: Bearer <token>
{
"produit": "New Laptop",
"client": "Acme Corp",
"raison": "Defective unit",
"etatTraitement": "EN_ATTENTE",
"date": "2026-04-07"
}GET /api/v1/retours?client=Acme&page=1&size=10
Authorization: Bearer <token># Login as USER
# Try DELETE /api/v1/retours/delete/1
# Expected: 403 Forbidden β# Start all services
docker-compose up -d
# View logs
docker-compose logs -f retour-app
# Restart services
docker-compose restart
# Stop services
docker-compose down
# Stop and remove volumes
docker-compose down -v
# Check service status
docker-compose ps# Clean and build
mvn clean package
# Build without tests
mvn clean package -DskipTests
# Run with Maven
mvn spring-boot:run
# Run tests
mvn test- Import project as Maven project in IntelliJ IDEA or Eclipse
- Maven automatically downloads dependencies
- Configure Run Configuration to run
GestionRetoursApplication
βββββββββββββββββββββββββββββββββββββββ
β Client (Browser/App) β
βββββββββββββββββββ¬ββββββββββββββββββββ
β
ββββββββββΌβββββββββ
β Swagger UI β
β & REST API β
ββββββββββ¬βββββββββ
β
βββββββββββββββββββΌββββββββββββββββββββ
β Spring Boot Application β
βββββββββββββββββββββββββββββββββββββββ€
β Controllers β
β ββ AuthController β
β ββ UserController β
β ββ RetourProductController β
β ββ NonConformiteController β
βββββββββββββββββββββββββββββββββββββββ€
β Services β
β ββ AuthService β
β ββ UserService β
β ββ RetourProduitService β
β ββ NonConformiteService β
βββββββββββββββββββββββββββββββββββββββ€
β Repositories (JPA) β
β ββ UserRepository β
β ββ RetourProduitRepository β
β ββ NonConformiteRepository β
βββββββββββββββββββββββββββββββββββββββ€
β Security (JWT, RBAC) β
β ββ JwtAuthFilter β
β ββ CustomUserDetailsService β
β ββ SecurityConfig β
βββββββββββββββββββ¬ββββββββββββββββββββ
β
ββββββββββΌβββββββββ
β MySQL DB β
β gestion_retour β
βββββββββββββββββββ
If you see "Access to localhost:8080 was denied. HTTP ERROR 403"
This is EXPECTED and CORRECT! Your application has JWT security enabled:
- The home endpoint (
/) is protected - This is not an error - it's your security working perfectly! β
To access the API:
- Use Swagger UI: http://localhost:8080/swagger-ui.html (HTTP 200 β)
- Register or login with test credentials
- Get JWT token
- Use token in
Authorization: Bearer TOKENheader
- Pagination support for large datasets
- Efficient filtering on returns and non-conformities
- JWT token-based stateless authentication
- Database indexing via JPA
- Ready for production deployment
β
JWT token-based authentication
β
Role-based access control (RBAC)
β
Password hashing with BCrypt
β
Secure headers configuration
β
CORS enabled for frontend
β
Input validation on all endpoints
β
Global exception handling
- Create a feature branch
- Make your changes
- Test locally with different user roles
- Submit a pull request
- Spring Boot Documentation
- SpringDoc OpenAPI
- JWT (JSON Web Token)
- Docker Documentation
- MySQL Documentation
- Spring Security
This project is proprietary and confidential.
Last Updated: April 10, 2026 β UPDATED
Version: 1.0.1 with User Management Improvements & Return History Fixes
π Ready to deploy and test!