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

Luca Burgazzoli edited comment on CAMEL-11196 at 5/9/17 5:41 AM:
-----------------------------------------------------------------

We may generate something like:

{code:java}
camel.component-name.option1 = default-option-1
camel.component-name.option2 = default-option-2

// Use the dot notation for spring's map based binding as [] may 
// not work in some properties backends like k8s' configmap/secrets
camel.component-name.configuration.my-component.my-option2 = not-default-anymore
{code}

Then the spring boot auto-configuration would:

- register and configure the component with ``component-name`` component as 
usual 
- register and configure number of bean according to the configuration map of 
the same type of the ``component-name`` but registered with a different name so 
that they can be referenced by name as usual but with properties inherited from 
component-name (or maybe not) 

Of course the drawback is that the [my-component] won't get auto-completed y 
IDEs but this solution would give a good flexibility and you can get the name 
of the supported parameters, theirs default and the doc from the root 
configuration.
 




was (Author: lb):
We may generate something like:

{code:java}
camel.component-name.option1 = default-option-1
camel.component-name.option2 = default-option-2

// Use the dot notation as [] may not work in some properties
// backends like k8s' configmap/secrets
camel.component-name.configuration.my-component..my-option2 = 
not-default-anymore
{code}

Then the spring boot auto-configuration would:

- register and configure the component with ``component-name`` component as 
usual 
- register and configure number of bean according to the configuration map of 
the same type of the ``component-name`` but registered with a different name so 
that they can be referenced by name as usual but with properties inherited from 
component-name (or maybe not) 

Of course the drawback is that the [my-component] won't get auto-completed y 
IDEs but this solution would give a good flexibility and you can get the name 
of the supported parameters, theirs default and the doc from the root 
configuration.
 



> Camel connectors - Allow to configure in one place and let it figure out 
> component vs endpoint level
> ----------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-11196
>                 URL: https://issues.apache.org/jira/browse/CAMEL-11196
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-connector
>            Reporter: Claus Ibsen
>             Fix For: 2.20.0
>
>
> A Camel connector can be configured on two levels
> - component
> - endpoint
> Just like a regular Camel component.
> But we should allow users to configure a connector in one place, and not 
> worry about if its component or endpoint level. And then let camel-connector 
> when it prepares the connector figure out all of this for you.
> This may require supporting loading configuration from external resource 
> files such as .properties files etc. Or something else. But from end users we 
> can make this easier.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to