2017-12-13 5 views
1

tikaの例をで検索しようとしています。spring DSLを使用しています。tikaを使用しているApache camel

私はtikaコネクタが利用できますが、spring DSLを使用した例はありません。私はhttps://github.com/apache/camel/tree/master/examples#examplesのリンクを含むすべての場所を見ましたが、これまでの運はありません。

私はそれに助けてください。例として使用することができる公式レポでシンプルなユニットテストがあります

答えて

0

、私見:

https://github.com/apache/camel/blob/master/components/camel-tika/src/test/java/org/apache/camel/component/tika/TikaDetectTest.java

others unit testsを見てみましょう。

私たちは、このような春のDSLに前述のテストでルートを運ぶことができます:

<?xml version="1.0" encoding="UTF-8"?> 
<beans xmlns="http://www.springframework.org/schema/beans" 
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xsi:schemaLocation=" 
     http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd 
     http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> 

    <camelContext id="tikaCamelContext" xmlns="http://camel.apache.org/schema/spring"> 
     <route> 
      <from uri="direct:start"/> 
      <to uri="tika:detect"/> 
      <to uri="mock:result"/> 
     </route> 
    </camelContext> 
</beans> 

pom.xmlファイルにコンポーネントを追加することを忘れないでください:

<dependency> 
    <groupId>org.apache.camel</groupId> 
    <artifactId>camel-tika</artifactId> 
    <version>${camel-version}</version> 
</dependency> 

これは何をあなたです探しています?

+0

ありがとうございます。 –

関連する問題