2016-06-28 15 views
0

私はSpring Integrationを使ってremoteDirectoryExpressionを設定しようとしています。以下のコードでは、 "headers。['remote_dir']"に設定しています。ただし、以下のエラーが表示されます。それを動作させるにはどうすればいいですか?ありがとう。spring integration IntegrationFlow DSL for ftp

org.springframework.beans.factory.BeanCreationException:名前のBeanを作成エラー 'ftpoutという' クラスパス・リソースに定義されている[COM/carrotit/CA /設定/ SpringIntegrationFtp.class]:ファクトリメソッドを介してビーンのインスタンス化に失敗しました。ネストされた例外はorg.springframework.beans.BeanInstantiationExceptionです:[org.springframework.integration.dsl.IntegrationFlow]のインスタンス化に失敗しました:ファクトリメソッド 'ftpOut'が例外をスローしました。ネストされた例外はorg.springframework.expression.spel.SpelParseExceptionある:EL1049E:(POS 7):予期しないデータの後に '': 'lsquare([)'

=========== ==コード=====================

@Bean 
    public IntegrationFlow ftpOut() { 

//  String remoteDirectory = "/root/sub/subfolder/"; 
     String remoteDirectoryExpression ="headers.['remote_dir']"; 

     return IntegrationFlows.from(messageChannel()) 
       .handle(Ftp.outboundAdapter(sessionFactory(), FileExistsMode.REPLACE).remoteDirectoryExpression(remoteDirectoryExpression) 
         .autoCreateDirectory(true)) 
       .get(); 

    } 

答えて

0

は、期間を削除します。それは

"headers['remote_dir']"; 

SpEL referenceを参照してください。

+0

ありがとう、ゲイリー、それはドットを削除した後に動作します。 –

関連する問題