在运行camel blueprint test时加载属性文件

时间:2016-12-15 06:34:50

标签: apache-camel jbossfuse blueprint-osgi camel-test

我使用<md-input-container class="md-block" flex-gt-sm> <label>Filterable Columns</label> <md-select ng-model="visualization.filterable_columns" ng-change="drawFilters()" multiple="true" ng-init="index = 1"> <md-option ng-repeat="filterable_column in vm.filterable_columns" value="{{index++}}"> {{filterable_column.label} </md-option> </md-select> </md-input-container> 标记加载属性,如下所示:

property-placeholder

在JBOSS Fuse上部署我的项目时,它将从FUSE的<cm:property-placeholder id="myblueprint.test" persistent-id="camel.blueprint"/> 目录加载camel.blueprint.cfg,当我在结构配置文件上部署项目时,它将从在配置文件中创建的属性文件中读取。 / p>

但是,当我运行camel blueprint test时,如何将其配置为从特定位置加载属性文件?

1 个答案:

答案 0 :(得分:3)

浏览property-placeholder @Override protected String[] loadConfigAdminConfigurationFile() { // String[0] = tell Camel the path of the .cfg file to use for OSGi ConfigAdmin in the blueprint XML file // String[1] = tell Camel the persistence-id of the cm:property-placeholder in the blueprint XML file return new String[]{"src/test/resources/etc/stuff.cfg", "stuff"}; } 后,我得到了解决方案。我们可以在测试用例文件中设置属性文件的位置,如下所示:

.cfg
  • 请确保,属性文件的扩展名为views.py。否则会被忽略。