You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Wilson MacGyver <wm...@gmail.com> on 2017/06/21 20:16:02 UTC

setPropertyPlaceholderLocations for apache camel main

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.

Re: setPropertyPlaceholderLocations for apache camel main

Posted by Wilson MacGyver <wm...@gmail.com>.
Thank you!
On Fri, Jun 23, 2017 at 10:00 AM Claus Ibsen <cl...@gmail.com> 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 <wm...@gmail.com>
> 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
>

Re: setPropertyPlaceholderLocations for apache camel main

Posted by Claus Ibsen <cl...@gmail.com>.
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 <wm...@gmail.com> 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