camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CAMEL-1656) Properties file component - And allow simple language to access the properties
Date Sun, 07 Feb 2010 15:24:34 GMT

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

Claus Ibsen commented on CAMEL-1656:
------------------------------------

And simple language can not leverage properties as well
{code}
                from("direct:start")
                    .transform().simple("Hi ${body} do you think ${properties:cheese.quote}?");
{code}

With properties
{code}
cheese.quote=Camel rocks
{code}

> Properties file component - And allow simple language to access the properties
> ------------------------------------------------------------------------------
>
>                 Key: CAMEL-1656
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1656
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.3.0
>
>
> People using Spring XML as DSL is challenged with the fact they dont have a real programming
language under the cover.
> And people do not want to hardcode values/options in the DSL directly. And spring property
placeholder support is limited in what it can do.
> So we need for now our own properties component that can load a properties file from
classpath. Leverage the spring resource endpoint that can do this.
> And let the simple language be able to access these properties as well so people can
use it in expressions
> {code}
> <simple>${propertiesfile:foo:email}</simple>
> {code}
> And the properties file is could be define something like:
> {code}
> <endpoint id="foo" url="propertiesfile://META-INF/myprops.properties"/>
> {code}
> And the file content
> {code}
> email=someone@somewhere.org
> {code}
> Need to think a bit about how to define the properties file. If we can allow you to define
it as a url or as a ref.
> For instance the simple expression could be:
> {code}
> <simple>${propertiesfile:classpath://META-INF/myprops.properties:email}</simple>
> {code}
> The above is for quick and dirty.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message