diff --git a/quip/pom.xml b/quip/pom.xml new file mode 100644 index 0000000000..452cf93ebb --- /dev/null +++ b/quip/pom.xml @@ -0,0 +1,61 @@ + + + 4.0.0 + com.redhat.training.example + quip + An application that prints a quip + 1.0 + war + + + 2.1.0.Final + 1.8 + 1.8 + false + UTF-8 + + + + + + io.thorntail + bom-all + ${version.wildfly.swarm} + import + pom + + + + + + quip + + + io.thorntail + thorntail-maven-plugin + ${version.wildfly.swarm} + + + + + package + + + + + + + + + + + javax + javaee-api + 7.0 + provided + + + + + diff --git a/quip/src/main/java/com/redhat/training/example/JaxRsActivator.java b/quip/src/main/java/com/redhat/training/example/JaxRsActivator.java new file mode 100644 index 0000000000..c166bea39e --- /dev/null +++ b/quip/src/main/java/com/redhat/training/example/JaxRsActivator.java @@ -0,0 +1,8 @@ +package com.redhat.training.example; + +import javax.ws.rs.ApplicationPath; +import javax.ws.rs.core.Application; + +@ApplicationPath("/") +public class JaxRsActivator extends Application { +} diff --git a/quip/src/main/java/com/redhat/training/example/Quip.java b/quip/src/main/java/com/redhat/training/example/Quip.java new file mode 100644 index 0000000000..27afa775ae --- /dev/null +++ b/quip/src/main/java/com/redhat/training/example/Quip.java @@ -0,0 +1,28 @@ +package com.redhat.training.example; + +import javax.ws.rs.Path; +import javax.ws.rs.core.Response; +import javax.ws.rs.GET; +import javax.ws.rs.Produces; +import java.net.InetAddress; + + +@Path("/") +public class Quip { + +@GET +@Produces("text/plain") +public Response index() throws Exception { + String host = InetAddress.getLocalHost().getHostName(); + return Response.ok("Veni, vidi, vici...\n").build(); + } + +@GET +@Path("/ready") +@Produces("text/plain") +public Response ready() throws Exception { + return Response.ok("OK\n").build(); + } + +} +