This is a Spring Boot application that provides REST API endpoints to manage pilot information, including their names and remaining work hours for the week.
- Java 17 or higher
- Gradle 8.12.1 or higher
./gradlew build
./gradlew bootRun
The project includes a Makefile with the following targets:
make build
- Build the applicationmake run
- Run the applicationmake stop
- Stop the running applicationmake test
- Run unit testsmake clean
- Clean build artifactsmake all
- Clean and build (default)make help
- Show available targets
Example usage:
# Build and run the application
make build
make run
# Run tests
make test
# Stop the application
make stop
- GET
/api/pilots
- Returns a list of all pilots with their names and remaining work hours
- POST
/api/pilots
- Add a new pilot with their name and initial work hours
- Request body example:
{ "name": "John Doe", "hoursLeftThisWeek": 40 }