You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Luca Burgazzoli (JIRA)" <ji...@apache.org> on 2017/05/08 16:28:04 UTC
[jira] [Commented] (CAMEL-10031) camel-spring-boot - Add endpoint
options as type-safe configuration properties
[ https://issues.apache.org/jira/browse/CAMEL-10031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16001029#comment-16001029 ]
Luca Burgazzoli commented on CAMEL-10031:
-----------------------------------------
Would it make sense to have an hook on the component to inject an "endpoint options processor" ? Because not all the endpoints have a getter/setter for the options (most of the new component have a configuration class instead) the auto configuration task may not be trivial.
As far as I remember there was also a discussion on how to assign an id to an endpoint and if we can make that we can do something like:
{code:java}
from("ftp://bar@myserver/path?id=test")
.to("...")
{code}
{code}
camel.component.ftp.endpoints[test].password = secret
{code}
The hook (which is added by spring-boot auto configuration) will then inspect the components option for an id field and adds the options from spring-boot related to such id.
For xml we can leverage the id on the element.
The hook may be triggered between:
{code:java} Endpoint createEndpoint(String uri) {code}
And:
{code:java} Endpoint createEndpoint(String uri, String remaining, Map<String,Object> parameters) {code}
> camel-spring-boot - Add endpoint options as type-safe configuration properties
> ------------------------------------------------------------------------------
>
> Key: CAMEL-10031
> URL: https://issues.apache.org/jira/browse/CAMEL-10031
> Project: Camel
> Issue Type: New Feature
> Components: camel-spring-boot
> Reporter: Claus Ibsen
> Assignee: Nicola Ferraro
>
> See CAMEL-9419.
> We can now configure this for all the components. But for endpoints its a bit more as you can have many endpoints with different configuration.
> So either you assign an id to the endpoint you configure, and then need to refer to the endpoint by id, in the camel routes. Or we figure out something else.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)