0

在网上找不到任何东西,任何人都知道如何按照以下 spring-camel bean 设置在蓝图中执行等效操作:-

<!-- 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 是骆驼弹簧的一部分,而不是骆驼蓝图,所以如果我想使用蓝图,就不能这样使用它。

或者有没有更好的方法在 blueprint 中做到这一点?

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

4

1 回答 1

0

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

虽然这取决于您使用的骆驼版本,如果它在骆驼核心等中。

于 2013-10-21T06:13:51.397 回答