Fix retry-and-more Sample Bug
Incorrect SpEL for rename.
This commit is contained in:
@@ -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 "
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user