The Flight Search API is a backend service designed to provide comprehensive flight search functionalities. It allows users to query flights based on various criteria and manage bookings. This project is built using Spring Boot and follows RESTful principles.
- Search for flights based on departure and arrival locations, dates, and times.
- View detailed information about flights including price and duration.
- User authentication and authorization for secure access.
- Ability to create, read, update, and delete (CRUD) flight and airport data.
- Scheduled tasks for fetching and updating flight data from third-party services.
- Java Development Kit (JDK) 8 or later.
- Maven or Gradle (as your build tool).
- MySQL (or any other relational database you prefer).
-
Clone the repository
git clone https://github.com/ozan-git/flight-search-api cd flight-search-api -
Configure the database
- Create a new database in your MySQL server.
- Update
src/main/resources/application.propertieswith your database credentials and URL.
-
Build the application
- For Maven:
mvn clean install
- For Gradle:
gradle build
- For Maven:
-
Run the application
- For Maven:
mvn spring-boot:run
- For Gradle:
gradle bootRun
- For Maven:
After starting the application, you can access the API endpoints through http://localhost:8080/. Here are some common
endpoints you might use:
GET /api/flights: Retrieves all flights.POST /api/flights: Adds a new flight.GET /api/airports: Retrieves all airports.POST /api/auth/signup: Registers a new user.
For detailed API documentation, visit http://localhost:8080/swagger-ui.html after starting the application.
Contributions are welcome! Please feel free to submit a Pull Request or create an issue for any bugs or improvements.