You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2020/09/30 16:18:00 UTC

[jira] [Commented] (CAMEL-15602) camel-main - Add support for property placeholders in #class factory method parameters

    [ https://issues.apache.org/jira/browse/CAMEL-15602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17204854#comment-17204854 ] 

Claus Ibsen commented on CAMEL-15602:
-------------------------------------

Or if you do

username=mongoadmin
password=mongoadmin
mongoServer=mongodb.mongodb
mongoServerPort=27017
connectionBeanDef=#class:com.mongodb.client.MongoClients#create("mongodb://{{username}}:{{password}}@{{mongoServer}}:{{mongoServerport}}")

> camel-main - Add support for property placeholders in #class factory method parameters
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-15602
>                 URL: https://issues.apache.org/jira/browse/CAMEL-15602
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-main
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 3.6.0
>
>
> camel.beans.mongo: '#class:com.mongodb.client.MongoClients#create("mongodb://mongoadmin:password@mongodb.mongodb:27017")'
> And if we want to use ENV variables for username and password then its currently not possible with
> "mongodb://{{env:XXX}}:{{env:YYY}}@mongodb.mongodb:27017"



--
This message was sent by Atlassian Jira
(v8.3.4#803005)