Croway commented on code in PR #218:
URL: 
https://github.com/apache/camel-spring-boot-examples/pull/218#discussion_r4185768128


##########
azure/camel-example-spring-boot-azure-storage-blob/src/main/java/camel/sample/BlobRouteBuilder.java:
##########
@@ -0,0 +1,38 @@
+/*
+ * 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 camel.sample;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.springframework.stereotype.Component;
+
+@Component
+public class BlobRouteBuilder extends RouteBuilder {
+
+    @Override
+    public void configure() {
+        from("direct:uploadBlob")
+            
.to("azure-storage-blob://{{azure.storage.account-name}}/{{azure.storage.container-name}}"
+                + "?operation=uploadBlockBlob"
+                + "&serviceClient=#serviceClient");

Review Comment:
   No `serviceClient` bean is defined in main code (only in the tests), so the 
app fails at startup: `NoSuchBeanException: No bean could be found in the 
registry for: serviceClient of type: com.azure.storage.blob.BlobServiceClient`. 
Same for `BlobTagsRouteBuilder` and `BlobSnapshotRouteBuilder`. Either add a 
`@Bean BlobServiceClient serviceClient` in main, or drop `#serviceClient` and 
configure the component via properties.



##########
azure/camel-example-spring-boot-azure-storage-blob/src/main/resources/application.yml:
##########
@@ -0,0 +1,11 @@
+azure:
+  storage:
+    account-name: ${AZURE_STORAGE_ACCOUNT_NAME:devstoreaccount1}
+    container-name: ${AZURE_STORAGE_CONTAINER_NAME:testcontainer}
+
+camel:
+  component:
+    azure-storage-blob:
+      credential-type: SHARED_KEY_CREDENTIAL

Review Comment:
   `AZURE_STORAGE_ACCESS_KEY` from the README is never read, so 
`SHARED_KEY_CREDENTIAL` has no key to sign with. Suggest adding `access-key: 
${AZURE_STORAGE_ACCESS_KEY}` here (or using it in a main-code client bean).



##########
azure/camel-example-spring-boot-azure-storage-blob/src/main/resources/application.yml:
##########
@@ -0,0 +1,11 @@
+azure:

Review Comment:
   Missing ASF license header.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to