How to load external properties file through OSGi blueprint property-placeholder and Java DSL

你离开我真会死。 提交于 2019-12-06 16:37:41

Neither the blueprint cm:property-placeholde nor the configuration-admin service use the file you added to the etc folder. The cm is just another way of using the configuration admin service.
The felix FileInstaller does read cfg files from the etc folder of your ServiceMix instance and does propagate those properties to the Configuration Admin service.
So in your case you'll need to add another configuration to the FileInstaller to read from another path.
This can be done by adding a new configuration file:

org.apache.felix.fileinstall-mySpecialDir.cfg

where you add the new folder to be watched:

felix.fileinstall.dir = myNewSpecialDirectory-to-be-watched

plus some more if needed. Documentation for it can be found here

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!