You can use property-placeholder for this purpose. Say for example you have a
properties file called app.properties, you need place it in
${karaf.home}/etc and then have the following configuration in blueprint.xml

        <cm:property-placeholder persistent-id="app" update-strategy="reload">
                <cm:default-properties>
                        <cm:property name="prop1key" value="prop1Value" /> 
                        <cm:property name="prop2key" value="prop2Value" /> 
                </cm:default-properties>
        </cm:property-placeholder>

        <bean id="bean1" class="com.foo.Bean" >
                <property name="props">
                        <map>
                                <entry key="prop1key" value="${prop1key}" />
                                <entry key="prop2key" value="${prop2key}" />
                        </map>
                </property>
        </bean>

When the app.properties file is changed, karaf will reload the file.
Detailed tutorial available at here
<http://www.liquid-reality.de/display/liquid/2011/09/23/Karaf+Tutorial+Part+2+-+Using+the+Configuration+Admin+Service>
  



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Import-Map-via-blueprint-container-tp4031365p4031375.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Reply via email to