Camel Blueprint中是否存在等效的AntPath匹配器

时间:2013-10-21 04:06:42

标签: apache-camel blueprint-osgi

在网上找不到任何东西,任何人都知道如何按照以下春骆驼豆设置做蓝图等效: -

<!-- define our filter as a plain spring bean -->
<bean id="csvAntFilter" class="org.apache.camel.component.file.AntPathMatcherGenericFileFilter">
    <property name="includes" value="*.csv"/>
</bean>

<route>
  <from uri="file://inbox?filter=#csvAntFilter"/>
  <to uri="bean:processInbox"/>
</route>

我的理解(抱歉还是相当有限的骆驼),是AntPathMatcher是camel-spring的一部分,而不是驼峰蓝图,所以如果我想使用蓝图,就不能这样使用它。

或者在蓝图中有更好的方法吗?

修改 的 我发现存在camel-core-xml但不确定如何在其中使用AntPathMatcher。

1 个答案:

答案 0 :(得分:0)

Ant路径匹配器是camel-core的一部分,因此您也可以将它与蓝图一起使用。它曾经是驼峰的一部分,但我们把它移到核心,所以人们可以在没有Spring的情况下使用它,例如Java或Blueprint等。

虽然这取决于你使用的Camel版本,如果它是在camel-core等。