Overview
The Kin Conecta backend is built with Spring Boot 4.0.3 and Java 21. This guide covers running the backend locally for development and testing.Prerequisites
Java 21
JDK 21 or higher is required. The project uses Java 21 language features.
MySQL Database
MySQL 8+ must be running with the Kin Conecta schema created.
Gradle
Gradle wrapper is included. No separate installation needed.
Application Config
Database credentials must be configured in application.properties.
Verify Java Installation
Before starting, verify Java 21 is installed:Running the Backend
Configure Database Connection
Ensure your
src/main/resources/application.properties is properly configured.See Configuration Guide for details.Start the Application
Run the Spring Boot application using Gradle:The application will compile and start. You should see output similar to:
Build Configurations
The project uses Gradle with the following key configurations:Gradle Build File
Frombuild.gradle:
Key Dependencies
- Spring Boot Starter Data JPA - Database access and ORM
- Spring Boot Starter WebMVC - REST API framework
- Spring Boot Starter Security - Authentication and authorization
- MySQL Connector - MySQL JDBC driver
- Lombok - Reduces boilerplate code
- Spring Boot DevTools - Hot reload during development
Available Gradle Commands
API Endpoints
The backend exposes RESTful API endpoints for all resources. The system includes 195 CRUD routes across 39 controllers.Base URL
Example Endpoints
User Management
User Management
Tours
Tours
Languages
Languages
FAQ
FAQ
For a complete catalog of all 195 endpoints, refer to the
ENDPOINTS.md file in the backend directory.Testing the API
Using cURL
Using Postman
- Import the API collection (if available)
- Set the base URL to
http://localhost:8080 - Configure headers:
Content-Type: application/json - Test individual endpoints
Troubleshooting
Port Already in Use
If port 8080 is already occupied:- Option 1: Stop the process using port 8080
- Option 2: Change the port in
application.properties:
Database Connection Errors
Common causes:- MySQL server is not running
- Schema name mismatch in
application.properties - Incorrect credentials (username/password)
- Database not created (run
kinConnect.sqlfirst)
- Verify MySQL is running:
- Check schema exists:
- Verify credentials in
application.properties - Check connection URL matches your schema name
Java Version Mismatch
If you see errors about unsupported class file version:JAVA_HOME environment variable.
Gradle Build Failures
If the build fails:- Clean the project:
- Delete the build directory manually if needed
- Rebuild:
Development Tips
Hot Reload
The project includes Spring Boot DevTools for automatic restart on code changes. Simply save your Java files and the application will restart automatically.SQL Logging
SQL queries are logged to the console by default. This is configured inapplication.properties:
false.
Custom Build Directory
The project uses a custom build directory in the system temp folder to avoid permission issues:Next Steps
Once the backend is running:- Frontend Deployment - Set up the frontend application
- Configuration - Fine-tune application settings
- Explore the API using Postman or cURL
- Review the complete endpoint catalog in
ENDPOINTS.md