Spring integration 配置文件中的本地目录别名
在哪里可以找到说明“file:localdir”是xml配置文件中的别名的文档Spring integration 配置文件中的本地目录别名,spring-integration,Spring Integration,在哪里可以找到说明“file:localdir”是xml配置文件中的别名的文档 例如,在int sftp:inbound channel adapter示例文件中使用了这种表示法。我猜您指的是来自的这个local directory=“file:local dir” 因此,file:前缀表示org.springframework.core.io.Resource类型,在使用ResourceLoader启动应用程序上下文期间,可以将其从字符串位置解析为真实的资源对象。好的,在我们的例子中,它将是A
例如,在int sftp:inbound channel adapter示例文件中使用了这种表示法。我猜您指的是来自的这个
local directory=“file:local dir”
因此,file:
前缀表示org.springframework.core.io.Resource
类型,在使用ResourceLoader
启动应用程序上下文期间,可以将其从字符串
位置解析为真实的资源
对象。好的,在我们的例子中,它将是AbstractInboundFileSynchronizingMessageSource.setLocalDirectory(fileLocalDirectory)
。无论如何,将资源
从该位置
转换为文件
对象是一个Spring转换服务
魔术
有关支持的有效资源后缀的更多信息,请参见org.springframework.util.ResourceUtils