如何在FROM Uri中附加不同的路径 - Spring XML

时间:2016-02-08 15:52:56

标签: apache-camel

我无法在Xml配置文件中尝试将不同路径附加到FROM Uri,在java中可以这样做:

<html>
<head>
	<title></title>
</head>
<style type="text/css">
 
 
 .TT{
 width:95%;
 background-color:red;
}
</style>
<body>
  <div id="d1" class="TT">m</div>
  <h1 id="hh" class="TT">m</h1>
</body>
</html>

生成的路由会将文件从源路径移动到目标路径,如何使用Spring XML实现此目的?我一直在尝试不同的方法,并且无法找到让他们中的任何一个工作

String[] uris = new String[]{"file:source/path1","file:source/path2"};
from (uris).to("file:dest/path")

费边

1 个答案:

答案 0 :(得分:0)

您可以有多个from

<route id="bar">
    <from uri="file:source/path1"/>
    <from uri="file:source/path2"/>
    <to uri="file:dest/path"/>
</route>

这创建一个RouteDefinition,但是2个Route实例