【发布时间】:2019-07-04 00:50:35
【问题描述】:
我有一个常量值的字符串,我想在使用 MV 网关时将它传递给 rename_to 标头。
我尝试了下面的代码 sn-p 和一个通过在上下文中添加变量然后将其与 #basePath 一起使用的方法
@Value("${basePath:/home/}")
String basePath;
.enrichHeaders(h -> h
.headerExpression(RENAME_TO, "'${basePath}' + headers[file_remoteFile]")
.headerExpression(REMOTE_FILE, "headers[file_remoteFile]")
.header(REMOTE_DIRECTORY, "headers[file_remoteDirectory]"))
我在启动时遇到错误。如何在我的 application.properties 中提供 basePath
【问题讨论】:
标签: spring-integration spring-el spring-integration-sftp