You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/09/22 16:27:44 UTC

[camel-spring-boot-examples] branch master updated (9113234 -> 042b85a)

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

acosentino pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot-examples.git.


    from 9113234  Update .asf.yaml labels
     new 5e6656c  Added a little example for AWS2-S3
     new 60d899f  Regen README
     new e16ec43  Set the correct category for this example
     new 042b85a  Regen

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 README.adoc                                                 |  4 +++-
 .../README.adoc                                             | 13 ++++++++-----
 .../pom.xml                                                 | 12 ++++++------
 .../camel/example/springboot/aws2s3}/Application.java       |  2 +-
 .../apache/camel/example/springboot/aws2s3/CamelRoute.java  | 12 ++++--------
 .../src/main/resources/application.properties               |  8 ++++++--
 .../src/main/resources/logback.xml                          |  4 ++--
 pom.xml                                                     |  1 +
 8 files changed, 31 insertions(+), 25 deletions(-)
 copy {camel-example-spring-boot-infinispan => camel-example-spring-boot-aws2-s3}/README.adoc (50%)
 copy {camel-example-spring-boot-arangodb => camel-example-spring-boot-aws2-s3}/pom.xml (90%)
 copy {camel-example-spring-boot-grpc/hello-camel-grpc-client/src/main/java/org/apache/camel/example/springboot/grpc => camel-example-spring-boot-aws2-s3/src/main/java/org/apache/camel/example/springboot/aws2s3}/Application.java (95%)
 copy camel-example-spring-boot-activemq/src/main/java/sample/camel/SampleAutowiredAmqRoute.java => camel-example-spring-boot-aws2-s3/src/main/java/org/apache/camel/example/springboot/aws2s3/CamelRoute.java (79%)
 copy {camel-example-spring-boot-grpc/hello-camel-grpc-client => camel-example-spring-boot-aws2-s3}/src/main/resources/application.properties (84%)
 copy {camel-example-spring-boot-servicecall/consumer => camel-example-spring-boot-aws2-s3}/src/main/resources/logback.xml (93%)


[camel-spring-boot-examples] 03/04: Set the correct category for this example

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit e16ec43ad46cc6931bac7d443b6e7740a493bd22
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Sep 22 18:22:35 2020 +0200

    Set the correct category for this example
---
 camel-example-spring-boot-aws2-s3/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/camel-example-spring-boot-aws2-s3/pom.xml b/camel-example-spring-boot-aws2-s3/pom.xml
index f510b81..88616ca 100644
--- a/camel-example-spring-boot-aws2-s3/pom.xml
+++ b/camel-example-spring-boot-aws2-s3/pom.xml
@@ -30,7 +30,7 @@
     <description>An example showing the Camel AWS2 S3 component with Spring Boot</description>
 
     <properties>
-        <category>Database</category>
+        <category>Cloud</category>
         <spring.boot-version>${spring-boot-version}</spring.boot-version>
     </properties>
 


[camel-spring-boot-examples] 02/04: Regen README

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 60d899fdd137df22a858445f18d002aa220224ef
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Sep 22 18:21:32 2020 +0200

    Regen README
---
 README.adoc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/README.adoc b/README.adoc
index b40c99b..1a01275 100644
--- a/README.adoc
+++ b/README.adoc
@@ -11,7 +11,7 @@ View the individual example READMEs for details.
 == Examples
 
 // examples: START
-Number of Examples: 42 (0 deprecated)
+Number of Examples: 43 (0 deprecated)
 
 [width="100%",cols="4,2,4",options="header"]
 |===
@@ -53,6 +53,8 @@ Number of Examples: 42 (0 deprecated)
 
 | link:camel-example-spring-boot-arangodb/README.adoc[Spring Boot Arangodb] (camel-example-spring-boot-arangodb) | Database | An example showing the Camel ArangoDb component with Spring Boot
 
+| link:camel-example-spring-boot-aws2-s3/README.adoc[Spring Boot Aws2 S3] (camel-example-spring-boot-aws2-s3) | Database | An example showing the Camel AWS2 S3 component with Spring Boot
+
 | link:camel-example-spring-boot-rest-jpa/README.adoc[Spring Boot REST JPA] (camel-example-spring-boot-rest-jpa) | Database | An example demonstrating how to use Camel REST DSL with JPA to expose a RESTful API that performs CRUD
         operations on a database
     


[camel-spring-boot-examples] 04/04: Regen

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 042b85a5a242a96a4d2542fcbee6cd4f3d33165d
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Sep 22 18:23:55 2020 +0200

    Regen
---
 README.adoc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.adoc b/README.adoc
index 1a01275..ab0cd94 100644
--- a/README.adoc
+++ b/README.adoc
@@ -35,6 +35,8 @@ Number of Examples: 43 (0 deprecated)
 
 | link:camel-example-spring-boot-xml/readme.adoc[Spring Boot XML] (camel-example-spring-boot-xml) | Beginner | An example showing how to work with Camel routes in XML files and Spring Boot
 
+| link:camel-example-spring-boot-aws2-s3/README.adoc[Spring Boot Aws2 S3] (camel-example-spring-boot-aws2-s3) | Cloud | An example showing the Camel AWS2 S3 component with Spring Boot
+
 | link:camel-example-spring-boot-grpc/README.adoc[gRPC Spring Boot] (camel-example-spring-boot-grpc) | Cloud | An example showing the Camel gRPC component with Spring Boot
 
 | link:camel-example-spring-boot-grpc-kubernetes/README.adoc[gRPC Kubernetes] (camel-example-spring-boot-grpc-kubernetes) | Cloud | An example showing the Camel gRPC component with Spring Boot running on Kubernetes
@@ -53,8 +55,6 @@ Number of Examples: 43 (0 deprecated)
 
 | link:camel-example-spring-boot-arangodb/README.adoc[Spring Boot Arangodb] (camel-example-spring-boot-arangodb) | Database | An example showing the Camel ArangoDb component with Spring Boot
 
-| link:camel-example-spring-boot-aws2-s3/README.adoc[Spring Boot Aws2 S3] (camel-example-spring-boot-aws2-s3) | Database | An example showing the Camel AWS2 S3 component with Spring Boot
-
 | link:camel-example-spring-boot-rest-jpa/README.adoc[Spring Boot REST JPA] (camel-example-spring-boot-rest-jpa) | Database | An example demonstrating how to use Camel REST DSL with JPA to expose a RESTful API that performs CRUD
         operations on a database
     


[camel-spring-boot-examples] 01/04: Added a little example for AWS2-S3

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 5e6656c4e48b5c41053d8e1452249ab041344dcc
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Sep 22 18:20:34 2020 +0200

    Added a little example for AWS2-S3
---
 camel-example-spring-boot-aws2-s3/README.adoc      | 33 ++++++++
 camel-example-spring-boot-aws2-s3/pom.xml          | 88 ++++++++++++++++++++++
 .../example/springboot/aws2s3/Application.java     | 34 +++++++++
 .../example/springboot/aws2s3/CamelRoute.java      | 31 ++++++++
 .../src/main/resources/application.properties      | 23 ++++++
 .../src/main/resources/logback.xml                 | 36 +++++++++
 pom.xml                                            |  1 +
 7 files changed, 246 insertions(+)

diff --git a/camel-example-spring-boot-aws2-s3/README.adoc b/camel-example-spring-boot-aws2-s3/README.adoc
new file mode 100644
index 0000000..3120529
--- /dev/null
+++ b/camel-example-spring-boot-aws2-s3/README.adoc
@@ -0,0 +1,33 @@
+== Spring Boot Example with AWS2-S3
+
+=== Introduction
+
+This example demonstrates how you can use Camel-AWS2-S3 Starter component. The example is really simple: load file into your bucket and consume it.
+
+=== Build
+
+You can build this example using:
+
+    $ mvn package
+
+=== Run
+
+You can run this example following these steps using:
+
+In application.properties set all the AWS credentials and the bucket name
+
+Run the app
+
+    $ mvn spring-boot:run
+
+And you should see output in the console. 
+
+=== Help and contributions
+
+If you hit any problem using Camel or have some feedback, then please
+https://camel.apache.org/support.html[let us know].
+
+We also love contributors, so
+https://camel.apache.org/contributing.html[get involved] :-)
+
+The Camel riders!
diff --git a/camel-example-spring-boot-aws2-s3/pom.xml b/camel-example-spring-boot-aws2-s3/pom.xml
new file mode 100644
index 0000000..f510b81
--- /dev/null
+++ b/camel-example-spring-boot-aws2-s3/pom.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.camel.springboot.example</groupId>
+        <artifactId>examples</artifactId>
+        <version>3.6.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>camel-example-spring-boot-aws2-s3</artifactId>
+    <name>Camel SB Examples :: AWS2 S3</name>
+    <description>An example showing the Camel AWS2 S3 component with Spring Boot</description>
+
+    <properties>
+        <category>Database</category>
+        <spring.boot-version>${spring-boot-version}</spring.boot-version>
+    </properties>
+
+    <!-- Spring-Boot and Camel BOM -->
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-dependencies</artifactId>
+                <version>${spring.boot-version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.springboot</groupId>
+                <artifactId>camel-spring-boot-dependencies</artifactId>
+                <version>${project.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <!-- Camel -->
+        <dependency>
+            <groupId>org.apache.camel.springboot</groupId>
+            <artifactId>camel-spring-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.springboot</groupId>
+            <artifactId>camel-aws2-s3-starter</artifactId>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>${spring.boot-version}</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+
+</project>
diff --git a/camel-example-spring-boot-aws2-s3/src/main/java/org/apache/camel/example/springboot/aws2s3/Application.java b/camel-example-spring-boot-aws2-s3/src/main/java/org/apache/camel/example/springboot/aws2s3/Application.java
new file mode 100644
index 0000000..19e8609
--- /dev/null
+++ b/camel-example-spring-boot-aws2-s3/src/main/java/org/apache/camel/example/springboot/aws2s3/Application.java
@@ -0,0 +1,34 @@
+/*
+ * 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.apache.camel.example.springboot.aws2s3;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+// CHECKSTYLE:OFF
+@SpringBootApplication
+public class Application {
+
+    /**
+     * Main method to start the application.
+     */
+    public static void main(String[] args) {
+        SpringApplication.run(Application.class, args);
+    }
+
+}
+// CHECKSTYLE:ON
diff --git a/camel-example-spring-boot-aws2-s3/src/main/java/org/apache/camel/example/springboot/aws2s3/CamelRoute.java b/camel-example-spring-boot-aws2-s3/src/main/java/org/apache/camel/example/springboot/aws2s3/CamelRoute.java
new file mode 100644
index 0000000..5a826f1
--- /dev/null
+++ b/camel-example-spring-boot-aws2-s3/src/main/java/org/apache/camel/example/springboot/aws2s3/CamelRoute.java
@@ -0,0 +1,31 @@
+/*
+ * 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.apache.camel.example.springboot.aws2s3;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.springframework.stereotype.Component;
+
+@Component
+public class CamelRoute extends RouteBuilder {
+
+    @Override
+    public void configure() throws Exception {
+
+      from("aws2-s3://{{bucketName}}")
+                .log("Received body: ${body}");
+    }
+}
diff --git a/camel-example-spring-boot-aws2-s3/src/main/resources/application.properties b/camel-example-spring-boot-aws2-s3/src/main/resources/application.properties
new file mode 100644
index 0000000..fb7b353
--- /dev/null
+++ b/camel-example-spring-boot-aws2-s3/src/main/resources/application.properties
@@ -0,0 +1,23 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+camel.component.aws2-s3.accessKey=xxxx
+camel.component.aws2-s3.secretKey=yyyy
+camel.component.aws2-s3.region=region
+camel.springboot.main-run-controller=true
+logging.config=classpath:logback.xml
+bucketName=camel-kafka-connector
+
diff --git a/camel-example-spring-boot-aws2-s3/src/main/resources/logback.xml b/camel-example-spring-boot-aws2-s3/src/main/resources/logback.xml
new file mode 100644
index 0000000..0e4d220
--- /dev/null
+++ b/camel-example-spring-boot-aws2-s3/src/main/resources/logback.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<configuration>
+  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+    <encoder>
+      <pattern>%d{HH:mm:ss.SSS} [%-15.15thread] %-5level %-30.30logger - %msg%n</pattern>
+    </encoder>
+  </appender>
+  <appender name="FILE" class="ch.qos.logback.core.FileAppender">
+    <encoder>
+      <pattern>%d{HH:mm:ss.SSS} [%-15.15thread] %-5level %-30.30logger - %msg%n</pattern>
+    </encoder>
+    <file>target/camel-example-spring-boot-aws2-s3-1.log</file>
+  </appender>
+  <root level="INFO">
+    <!--<appender-ref ref="FILE"/>-->
+    <appender-ref ref="STDOUT"/>
+  </root>
+</configuration>
diff --git a/pom.xml b/pom.xml
index a919e91..737c2ad 100644
--- a/pom.xml
+++ b/pom.xml
@@ -39,6 +39,7 @@
         <module>camel-example-spring-boot-amqp</module>
         <module>camel-example-spring-boot-apm-opentracing</module>
         <module>camel-example-spring-boot-arangodb</module>
+        <module>camel-example-spring-boot-aws2-s3</module>
         <module>camel-example-spring-boot-clustered-route-controller</module>
         <module>camel-example-spring-boot-fhir</module>
         <module>camel-example-spring-boot-fhir-auth-tx</module>