setPropertyPlaceholderLocations for apache camel main

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

setPropertyPlaceholderLocations for apache camel main

Wilson MacGyver
I follow

https://camel.apache.org/running-camel-standalone-and-have-it-keep-running.html

and use

main.setPropertyPlaceholderLocations("example.properties");

to set my property file. but I run into


Error: java: setPropertyPlaceholderLocations(java.lang.String) has
protected access in org.apache.camel.main.Main


also, I currently use propertyPrefix to set the prefix for environment. I
don't see a way to set that?

alternatively,

can I just do

        PropertiesComponent pc = new PropertiesComponent();
        pc.setLocation("example.properties");
        pc.setPropertyPrefix("dev.");

        main.bind("properties", pc);


Thanks

--
Omnem crede diem tibi diluxisse supremum.
Reply | Threaded
Open this post in threaded view
|

Re: setPropertyPlaceholderLocations for apache camel main

Claus Ibsen-2
Hi

Thanks I logged a ticket
https://issues.apache.org/jira/browse/CAMEL-11441

On Wed, Jun 21, 2017 at 10:16 PM, Wilson MacGyver <[hidden email]> wrote:

> I follow
>
> https://camel.apache.org/running-camel-standalone-and-have-it-keep-running.html
>
> and use
>
> main.setPropertyPlaceholderLocations("example.properties");
>
> to set my property file. but I run into
>
>
> Error: java: setPropertyPlaceholderLocations(java.lang.String) has
> protected access in org.apache.camel.main.Main
>
>
> also, I currently use propertyPrefix to set the prefix for environment. I
> don't see a way to set that?
>
> alternatively,
>
> can I just do
>
>         PropertiesComponent pc = new PropertiesComponent();
>         pc.setLocation("example.properties");
>         pc.setPropertyPrefix("dev.");
>
>         main.bind("properties", pc);
>
>
> Thanks
>
> --
> Omnem crede diem tibi diluxisse supremum.



--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2
Reply | Threaded
Open this post in threaded view
|

Re: setPropertyPlaceholderLocations for apache camel main

Wilson MacGyver
Thank you!
On Fri, Jun 23, 2017 at 10:00 AM Claus Ibsen <[hidden email]> wrote:

> Hi
>
> Thanks I logged a ticket
> https://issues.apache.org/jira/browse/CAMEL-11441
>
> On Wed, Jun 21, 2017 at 10:16 PM, Wilson MacGyver <[hidden email]>
> wrote:
> > I follow
> >
> >
> https://camel.apache.org/running-camel-standalone-and-have-it-keep-running.html
> >
> > and use
> >
> > main.setPropertyPlaceholderLocations("example.properties");
> >
> > to set my property file. but I run into
> >
> >
> > Error: java: setPropertyPlaceholderLocations(java.lang.String) has
> > protected access in org.apache.camel.main.Main
> >
> >
> > also, I currently use propertyPrefix to set the prefix for environment. I
> > don't see a way to set that?
> >
> > alternatively,
> >
> > can I just do
> >
> >         PropertiesComponent pc = new PropertiesComponent();
> >         pc.setLocation("example.properties");
> >         pc.setPropertyPrefix("dev.");
> >
> >         main.bind("properties", pc);
> >
> >
> > Thanks
> >
> > --
> > Omnem crede diem tibi diluxisse supremum.
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>