0
当我的FTP mput传输成功完成时,我想重命名本地目录中的文件。为此,我需要使用PropertyPlaceholderConfigurer中的本地目录路径。但这似乎并没有奏效。请你可以建议合成文本扩大该物业的价值? $ {local.request.dir}表示像/ home/jainr/REQUEST这样的目录路径。以Spring表达式语言使用属性占位符
<int-ftp:request-handler-advice-chain>
<bean id="requestFileRename" class="org.springframework.integration.handler.advice.ExpressionEvaluatingRequestHandlerAdvice">
<property name="trapException" value="true" />
<property name="onSuccessExpression" value="T(org.apache.commons.io.FileUtils).moveFile(new java.io.File(#{${local.request.dir}} + '/' + headers['RequestFileName']), new java.io.File(#{${local.request.dir}} + '/' + headers['RequestFileName'] + '.processed'))" />
</bean>
</int-ftp:request-handler-advice-chain>
[Spring 3表达式语言如何与属性占位符交互?](http://stackoverflow.com/questions/2041558/how-does-spring-3-expression-language-interact-with-property-占位符) – benbenw
该问题只涉及初始化时间SpEL;这是运行时SpEL。 –