0
ファイルシステムからBeanメソッドにファイルを読み込むために、私はapache camel Fileを使用しています。私はspring xmlと一緒に使っています。私は、ルートプロセスでGenericFileProcessStrategyクラスのprepareOnStartupメソッドをオーバーライドする必要があります。 spring XMLファイルのfrom uriルート行で構文を教えてください。GenericFileProcessStrategyクラスのprepareOnStartupメソッドをオーバーライド
ばねXML:
<bean id="adoFilter" class="calypsox.bllInterfaces.cashMgn.cashMgnAdo.AdoFileFilter"/>
<camelContext xmlns="http://camel.apache.org/schema/spring" id="cashMgn">
<propertyPlaceholder id="cashMgnProperty"
location="${bll.resources.env}/cashMgn.properties" />
<route id="cashMgnAdo">
<from uri="file:{{cashMgnAdoFileDir}}?filter=#adoFilter;move=.org/${date:now:yyyyMMdd}/${file:name}&readLock=changed&readLockCheckInterval=2000&readLockTimeout=10000&moveFailed=.failed" />
<convertBodyTo type="java.lang.String" />
<to uri="bean:cashMgnHandler?method=handleCashMgnAdo" />
</route>
</camelContext>