Java Spring Boot backend service for the AeroTraceX flight tracking application.
- RESTful API for airport data management
- MySQL database integration
- Airport information storage (ICAO/IATA codes, coordinates, etc.)
- CRUD operations for airports
- Search and filter capabilities
- Java 17 or higher
- Maven 3.6+
- MySQL 8.0+
-
Install MySQL if not already installed
-
Create a database (optional - the application will create it automatically):
CREATE DATABASE aerotracex;
-
Update database credentials in
src/main/resources/application.properties:spring.datasource.username=root spring.datasource.password=your_password
-
Navigate to the backend directory:
cd backend -
Build the project:
mvn clean install
-
Run the application:
mvn spring-boot:run
The application will start on http://localhost:8080
GET /api/airports- Get all airportsGET /api/airports/{id}- Get airport by IDGET /api/airports/icao/{icaoCode}- Get airport by ICAO codeGET /api/airports/iata/{iataCode}- Get airport by IATA codeGET /api/airports/search?name={name}- Search airports by nameGET /api/airports/country/{country}- Get airports by countryGET /api/airports/bounds?minLat={minLat}&maxLat={maxLat}&minLng={minLng}&maxLng={maxLng}- Get airports within boundsPOST /api/airports- Create a new airportPUT /api/airports/{id}- Update an airportDELETE /api/airports/{id}- Delete an airport
| Column | Type | Description |
|---|---|---|
| id | BIGINT | Primary key (auto-increment) |
| icao_code | VARCHAR(4) | ICAO airport code (unique) |
| iata_code | VARCHAR(3) | IATA airport code |
| name | VARCHAR(255) | Airport name |
| city | VARCHAR(100) | City name |
| country | VARCHAR(100) | Country name |
| latitude | DOUBLE | Latitude coordinate |
| longitude | DOUBLE | Longitude coordinate |
| altitude | INT | Altitude in meters |
| timezone | VARCHAR(50) | Timezone |
| created_at | DATETIME | Creation timestamp |
| updated_at | DATETIME | Last update timestamp |
The application automatically populates the database with 30+ major airports worldwide on first startup.
- Spring Boot 3.2.1
- Spring Data JPA
- MySQL Connector
- Lombok
- Maven