You can run your application in dev mode that enables live coding using:
./mvnw compile quarkus:dev
If you want to use a local Postgresql database instead of the in-memory h2, start the server with the profile postgresql (for configuration of Postgresql, see below):
./mvnw compile quarkus:dev -Dquarkus.profile=postgresql
Required precondition: Installation of Docker: https://docs.docker.com/docker-for-mac/install/
Execute the following commands:
./mvnw package
docker build -f src/main/docker/Dockerfile.jvm -t quarkus/employeemanagement-jvm .
docker run -i --rm -p 8000:8000 quarkus/employeemanagement-jvm
Use jee-quarkus-learning.postman_collection.json for testing the APIs
As the H2 database is only configured in-memory, all the data disappears after server startup or deployment.
You can initialize the database with some nice data, by running src/test/java/ch/mobi/ueliloetscher/learning/employeemanagement/DataLoader.main()
Install Postgresql locally, see: https://postgresapp.com/
Open the postgres database and create database for the employeemanagement:
create database employeemanagement;
see: https://docs.microsoft.com/en-us/azure/developer/java/eclipse-microprofile/deploy-microprofile-quarkus-java-app-with-maven-plugin
az login
mvn clean package -Dquarkus.profile=mssql
mvn azure-webapp:deploy
brew install --cask graalvm/tap/graalvm-ce-java11
xattr -cr /Library/Java/JavaVirtualMachines/graalvm-ce-java11-21.0.0
export JAVA_HOME=/Library/Java/JavaVirtualMachines/graalvm-ce-java11-21.0.0/Contents/Home
export PATH=$PATH:$JAVA_HOME/bin
gu install native-image
```
### package native binary
./mvnw package -Pnative -Dquarkus.profile=postgresql
### Run
cd target ./employeemanagement-1.0.0-SNAPSHOT-runner