You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2021/03/19 10:39:54 UTC

[camel-quarkus-examples] branch master updated: Restore ExampleResource to http-log example as it is referenced in the README

This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus-examples.git


The following commit(s) were added to refs/heads/master by this push:
     new befb324  Restore ExampleResource to http-log example as it is referenced in the README
befb324 is described below

commit befb324f48c4627e1b9b74f1779029586b37d78f
Author: James Netherton <ja...@gmail.com>
AuthorDate: Fri Mar 19 09:53:15 2021 +0000

    Restore ExampleResource to http-log example as it is referenced in the README
---
 http-log/pom.xml                                   |  4 +++
 .../main/java/org/acme/http/ExampleResource.java   | 40 ++++++++++++++++++++++
 2 files changed, 44 insertions(+)

diff --git a/http-log/pom.xml b/http-log/pom.xml
index a8208e7..c5f659d 100644
--- a/http-log/pom.xml
+++ b/http-log/pom.xml
@@ -62,6 +62,10 @@
 
     <dependencies>
         <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-resteasy</artifactId>
+        </dependency>
+        <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
             <artifactId>camel-quarkus-log</artifactId>
         </dependency>
diff --git a/http-log/src/main/java/org/acme/http/ExampleResource.java b/http-log/src/main/java/org/acme/http/ExampleResource.java
new file mode 100644
index 0000000..1c3367c
--- /dev/null
+++ b/http-log/src/main/java/org/acme/http/ExampleResource.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.acme.http;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+/**
+ * A JAX-RS resource
+ */
+@Path("/hello")
+public class ExampleResource {
+
+    /**
+     * A JAX-RS endpoint always returning {@code "hello"}
+     *
+     * @return {@code "hello"}
+     */
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public String hello() {
+        return "hello";
+    }
+}