There appears to be an issue when reading in multiple .cfg files and exposing
them using <ctx:property-placeholder> in Karaf using SpringDM.
Consider the following which only exposes myAppProperties, but not
myBundleSpecificProperties:
<osgix:cm-properties id="myAppProperties" persistent-id="myApp.cfg"/>
<osgix:cm-properties id="myBundleSpecificProperties"
persistent-id="myApp.bundle.cfg"/>
<ctx:property-placeholder properties-ref="myAppProperties" />
<ctx:property-placeholder properties-ref="myBundleSpecificProperties"/>
Normally, I'd use the PropertyPlaceholderConfigurer to make both properties
files available to the context:
<bean id="myProperties"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="ignoreUnresolvablePlaceholders" value="true"/>
<property name="locations">
<list>
<value>file location a</value>
<value>file location b</value>
</list>
</property>
</bean>
Unfortunately, the locations property does not appear to accept a list of
bean references instead of file locations. Is there a better way to do this
in Karaf using SpringDM? I'd really like to have all of my application
specific properties in one file, instead of scattering them about in each of
my bundle-specific properties files. Any assistance would be greatly
appreciated.
-----
Karafman
Slayer of the JEE
Pounder of the Perl Programmer
--
View this message in context:
http://karaf.922171.n3.nabble.com/Placing-properties-files-in-the-classpath-tp2054553p2290999.html
Sent from the Karaf - User mailing list archive at Nabble.com.