camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-10255) Camel Main - Make it easy to configure property placeholder
Date Sun, 28 Aug 2016 19:30:20 GMT

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

ASF GitHub Bot commented on CAMEL-10255:
----------------------------------------

GitHub user DariusX opened a pull request:

    https://github.com/apache/camel/pull/1146

    CAMEL-10255 - Make it easy to configure property placeholder

    I added a setPropertyPlaceholderLocations() method to Main, as suggested by the ticket:

    https://issues.apache.org/jira/browse/CAMEL-10255
    
    I also made a change to the test class "MainExample" and added a test file example.properties.
    Not sure if a test is worth having in this case, but added it, just in case.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/DariusX/camel CAMEL-10255-Property-File-on-Main

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/camel/pull/1146.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1146
    
----
commit 38cb20834dd90b2a485f77d676d15e3a1f0232f3
Author: Darius <dariuscooper@gmail.com>
Date:   2016-08-28T18:11:47Z

    CAMEL-10255 - Make it easy to configure property placeholder

----


> Camel Main - Make it easy to configure property placeholder
> -----------------------------------------------------------
>
>                 Key: CAMEL-10255
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10255
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-core
>            Reporter: Claus Ibsen
>
> So you can use
> Where you can specify one or more locations separated by comma:
>     main.setPropertyPlaceholderLocations("myapp.properties");
> See SO
> http://stackoverflow.com/questions/39033103/how-to-access-property-file-in-apache-camel-with-java-dsl
> Today its a bit harder to do, where you either need to use the MainListener or to setup
the PropertiesComponent from a RouteBuilder configure method, or to use the bind which likely
is the easiest.
> PropertiesComponent prop = new PropertiesComponent();
> prop.setXXX
> main.bind("properties, prop);



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message