Apache camel camel dropbox-处理动态远程路径中的空白

Apache camel camel dropbox-处理动态远程路径中的空白,apache-camel,Apache Camel,我对一个非常简单的用例有一个问题 在dropbox文件夹中搜索文件 选择要加载的文件 从dropbox加载文件 我就是这样尝试的: from("timer:start?period=60m") //Load list of files .to("dropbox://search?accessToken={{accessToken}}&clientIdentifier={{clientIdentifier}}&remotePath={{remotePath}}") //

我对一个非常简单的用例有一个问题

  • 在dropbox文件夹中搜索文件
  • 选择要加载的文件
  • 从dropbox加载文件
  • 我就是这样尝试的:

    from("timer:start?period=60m")
      //Load list of files
      .to("dropbox://search?accessToken={{accessToken}}&clientIdentifier={{clientIdentifier}}&remotePath={{remotePath}}")
      //Create list of files to load
      .bean(FileHandlerBean.class, "prepareOperations")
      .split(simple("${body}"))
        //Load file from dropbox
        .recipientList(simple("dropbox://get?accessToken={{accessToken}}&clientIdentifier={{clientIdentifier}}&remotePath=${body.dropBoxFilePath}"))
      [...]
    
    正常情况下,这应该可以工作,但当remotePath包含带有空格的文件名(如2015-05-16 18.43.56.jpg)时,DropboxConfigurationValidator会引发异常

    我尝试使用URLCoder:

    URLEncoder.encode(dbxEntry.path, "UTF-8")
    
    但这没用。 我调试了该组件,可以看到,当DropBoxComponent获取参数时,“+”被转换回空白

    你知道我该怎么处理吗


    使用Camel版本2.17.1

    在下一个Camel版本中会出现此问题的错误修复。 以下是Jira门票的链接:


    然后可以在remotePath属性中使用空格。

    在下一个camel版本中,将有一个针对此问题的错误修复。 以下是Jira门票的链接:


    然后可以在remotePath属性中使用空格。

    谢谢您创建了JIRA并为PR提供了一个修复程序-就是这样做的:谢谢您创建了JIRA并为PR提供了一个修复程序-就是这样做的: