我使用的是camel-core 2.24.1并且能够执行以下操作:
from( sources.toArray(new String[0]) )
Run Code Online (Sandbox Code Playgroud)
其中,sources 是我从配置设置中获取的 URI 列表。我正在尝试更新代码以使用 Camel 3(camel-core 3.0.0-RC2),但上面提到的方法已被删除,我找不到其他方法来完成相同的操作。
基本上我需要这样的东西:
from( String uri : sources )
{
// add the uri as from(uri) before continuing with the route
}
Run Code Online (Sandbox Code Playgroud)
如果这有助于更好地理解,最终路线应如下所示:
from( String uri : sources )
{
// add the uri as from(uri) before continuing with the route
}
Run Code Online (Sandbox Code Playgroud)
任何帮助将不胜感激。