Fix retry-and-more Sample Bug

Incorrect SpEL for rename.
This commit is contained in:
Gary Russell
2015-11-20 16:38:34 -05:00
parent b335846952
commit 7ec8687efc
2 changed files with 2 additions and 2 deletions

View File

@@ -62,7 +62,7 @@ public class FileTransferRenameAfterFailureDemo {
+ "\n "
+ "\n Press 'Enter' to terminate. "
+ "\n "
+ "\n Place a file in ${java.io.tmpdir}/adviceDemo ending "
+ "\n Place a file in "+ System.getProperty("java.io.tmpdir") +"/adviceDemo ending "
+ "\n with .txt "
+ "\n The demo simulates a file transfer failure followed "
+ "\n by the Advice renaming the file; the result of the "

View File

@@ -34,7 +34,7 @@
<bean class="org.springframework.integration.handler.advice.ExpressionEvaluatingRequestHandlerAdvice">
<property name="onSuccessExpression" value="payload.delete()" />
<property name="successChannel" ref="afterSuccessDeleteChannel" />
<property name="onFailureExpression" value="payload.renameTo(payload.absolutePath + '.failed.to.send')" />
<property name="onFailureExpression" value="payload.renameTo(new java.io.File(payload.absolutePath + '.failed.to.send'))" />
<property name="failureChannel" ref="afterFailRenameChannel" />
</bean>
</int-ftp:request-handler-advice-chain>