The Helidon SE example implements the REST service using the Helidon WebServer component directly. It shows the basics of configuring the WebServer and implementing basic routing rules.
mvn archetype:generate -DinteractiveMode=false
-DarchetypeGroupId=io.helidon.archetypes
-DarchetypeArtifactId=helidon-quickstart-se
-DarchetypeVersion=1.4.4
-DgroupId=io.helidon.examples
-DartifactId=quickstart-se
-Dpackage=io.helidon.examples.quickstart.se
cd quickstart-se
mvn package
java -jar target/quickstart-se.jar
curl -X GET http://localhost:8080/greet
{"message":"Hello World!"}
curl -X GET http://localhost:8080/greet/Joe
{"message":"Hello Joe!"}
curl -X PUT -H "Content-Type: application/json" -d '{"greeting" : "Hola"}' http://localhost:8080/greet/greeting
curl -X GET http://localhost:8080/greet/Jose
{"message":"Hola Jose!"}
curl -s -X GET http://localhost:8080/health
{"outcome":"UP",...
. . .
# Prometheus Format
curl -s -X GET http://localhost:8080/metrics
# TYPE base:gc_g1_young_generation_count gauge
. . .
# JSON Format
curl -H 'Accept: application/json' -X GET http://localhost:8080/metrics
{"base":...
. . .
The Helidon MP example implements the REST service using the JAX-RS support provided by the Helidon MicroProfile server.
mvn archetype:generate -DinteractiveMode=false
-DarchetypeGroupId=io.helidon.archetypes
-DarchetypeArtifactId=helidon-quickstart-mp
-DarchetypeVersion=2.2.0
-DgroupId=io.helidon.examples
-DartifactId=quickstart-mp
-Dpackage=io.helidon.examples.quickstart.mp
cd quickstart-mp
mvn package
java -jar target/quickstart-mp.jar
curl -X GET http://localhost:8080/greet
{"message":"Hello World!"}
curl -X GET http://localhost:8080/greet/Joe
{"message":"Hello Joe!"}
curl -X PUT -H "Content-Type: application/json" -d '{"greeting" : "Hola"}' http://localhost:8080/greet/greeting
curl -X GET http://localhost:8080/greet/Jose
{"message":"Hola Jose!"}
curl -s -X GET http://localhost:8080/health
{"outcome":"UP",...
. . .
# Prometheus Format
curl -s -X GET http://localhost:8080/metrics
# TYPE base:gc_g1_young_generation_count gauge
. . .
# JSON Format
curl -H 'Accept: application/json' -X GET http://localhost:8080/metrics
{"base":...
. . .
Adapted from the guide Using JPA in Helidon MP
available here
Adapted from the guide Creating Docker Images
available here
export JAVA_HOME=/usr/lib/jvm/default-java
mvn archetype:generate -DinteractiveMode=false \
-DarchetypeGroupId=io.helidon.archetypes \
-DarchetypeArtifactId=helidon-quickstart-mp \
-DarchetypeVersion=1.4.1 \
-DgroupId=io.helidon.examples \
-DartifactId=mp-java-packaging \
-Dpackage=io.helidon.mp.javapackaging