- Language: Java 17
- Web Framework: Quarkus
- DB: H2
# Launch the service in dev env
$ ./mvnw clean quarkus:devsrc\main\java
|--boot\ # Contains DataLoader which loads the initial data fetching data from Fono API
|--fono\ # Mock implementation for Fono API.
|--phone\ # Contains the API endpoint for managing Phone inventory.
src\main\resources
|--db\ # Contains db initialization scriptsTo view the list of available APIs and their specifications, run the server and go to Swagger-UI in your browser. This documentation page is automatically generated using the Smallrye OpenAPI definitions from API interface.
List of available routes:
Application routes:
GET /v1/phones - Lists all phones
GET /v1/phone/{phoneIdentifier} - Gets the phone's details
POST /v1/phone/book - Books a phone
DELETE /v1/phone/book/{phoneIdentifier} - Returns the phone\
The application can be packaged using:
$ ./mvnw packageIt produces the quarkus-run.jar file in the target/quarkus-app/ directory.
Be aware that it’s not an über-jar as the dependencies are copied into the target/quarkus-app/lib/ directory.
The application is now runnable using java -jar target/quarkus-app/quarkus-run.jar.
If you want to build an über-jar, execute the following command:
$ ./mvnw package -Dquarkus.package.type=uber-jarThe application, packaged as an über-jar, is now runnable using java -jar target/*-runner.jar.
You can create a native executable using:
$ ./mvnw package -PnativeOr, if you don't have GraalVM installed, you can run the native executable build in a container using:
./mvnw package -Pnative -Dquarkus.native.container-build=trueYou can then execute your native executable with: ./target/phone-service-1.0.0-SNAPSHOT-runner