Devcontainer for using Quarkus/Kogito with Infinispan for persistence.
mvn clean compile quarkus:dev
open a new terminal and call endpoint with:
curl -X POST http://localhost:8021/persons \
-H 'content-type: application/json' \
-H 'accept: application/json' \
-d '{"person": {"name":"John Quark", "age": 20}}'
mvn clean test
mvn clean package -Pnative
# Find executable in `target` directory.
ls -l target
mvn verify -Pnative
docker build -f src/main/docker/Dockerfile.native -t quarkus/using-kogito .
In this example non-adults are persisted.
# persist
curl -X POST http://localhost:8021/persons \
-H 'content-type: application/json' \
-H 'accept: application/json' \
-d '{"person": {"name":"John Quark", "age": 15}}'
# fetch persons
curl -X GET http://localhost:8021/persons \
-H 'content-type: application/json' \
-H 'accept: application/json'
After restarting the app we get the same result when we fetching persons.