Ah, I mean more environment related such as "export MY_PROPERTY=something" the use it in Karaf via something like $[MY_PROPERTY].
I think we already had this discussion but I did not succeed in finding a corresponding Jira (?) Regards, JP -----Message d'origine----- De : Jean-Baptiste Onofré [mailto:[email protected]] Envoyé : vendredi 2 septembre 2016 14:36 À : [email protected] Objet : Re: Inject system property value via blueprint You mean to be able to use ${sys.user.home} in a cfg file where user.home is the system property ? Maybe it's related to: https://issues.apache.org/jira/browse/KARAF-4609 https://issues.apache.org/jira/browse/KARAF-3949 Regards JB On 09/02/2016 02:30 PM, CLEMENT Jean-Philippe wrote: > Hi JB, > > Does it also work for .cfg files? > > Regards, > JP > > -----Message d'origine----- > De : Jean-Baptiste Onofré [mailto:[email protected]] Envoyé : mercredi > 31 août 2016 15:49 À : [email protected] Objet : Re: Inject system > property value via blueprint > > Hi, > > you have to use the ext xmlns for that. > > Just add the following in your blueprint: > > <!-- Allow the use of system properties --> <ext:property-placeholder > placeholder-prefix="$[" placeholder-suffix="]" /> > > Then, you can use system properties with $[foo]. > > Regards > JB > > On 08/31/2016 03:46 PM, ellirael wrote: >> I saw an example how to inject property values which are defined in >> config file. >> It is some thing like this: >> >> <cm:property-placeholder persistent-id="ConfigApp" update-strategy="reload" >>> >> <cm:default-properties> >> <cm:property name="title" value="Default Title"/> >> </cm:default-properties> </cm:property-placeholder> <bean id="myApp" >> init-method="refresh"> <property name="title" >> value="$\{title\}"></property> </bean> >> >> How to do the same with the system property printed by >> system:property command output? >> Or how to gain access to those system properties values? >> >> >> >> -- >> View this message in context: >> http://karaf.922171.n3.nabble.com/Inject-system-property-value-via-bl >> u eprint-tp4047779.html Sent from the Karaf - User mailing list >> archive at Nabble.com. >> > > -- > Jean-Baptiste Onofré > [email protected] > http://blog.nanthrax.net > Talend - http://www.talend.com > -- Jean-Baptiste Onofré [email protected] http://blog.nanthrax.net Talend - http://www.talend.com
