obando February 2016

How to attach different paths in FROM Uri - Spring XML

Im having trouble trying to attach different paths to a FROM Uri in the Xml configuration file, in java it can be done like this:

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

The resulting route will move the files from the source paths to the destination path, how can i achieve this using Spring XML? i have been trying different aproachs and can't find to have any of them working

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

Fabian

Answers


Jérémie B February 2016

You can have multiple from :

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

This create one RouteDefinition, but 2 Route instances

Post Status

Asked in February 2016
Viewed 2,946 times
Voted 9
Answered 1 times

Search




Leave an answer