You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/02/15 20:35:16 UTC

[GitHub] [camel] davsclaus commented on a change in pull request #6944: camel-aws2-ddb: added data examples of PutItem and UpdateItem

davsclaus commented on a change in pull request #6944:
URL: https://github.com/apache/camel/pull/6944#discussion_r807292292



##########
File path: components/camel-aws/camel-aws2-ddb/src/main/docs/aws2-ddb-component.adoc
##########
@@ -266,8 +266,29 @@ URI:
 
 [source,java]
 ----------------------------------------------------
-from("direct:start")
-.to("aws2-ddb://domainName?amazonDDBClient=#client");
+public class MyRouteBuilder extends RouteBuilder {
+
+    private String accessKey = "myaccessKey";
+    private String secretKey = "secretKey";
+
+    @Override
+    public void setCamelContext(CamelContext camelContext) {

Review comment:
       It is not good practice to do code in a setter - keep setter as plain getter/setter.
   
   Instead you can create a method with this logic, and call this method from configure()




-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org