You can assign names to your routes in Java DSL using routeId
from("direct:start").routeId("myRoute")
.to(mock:bar);
|
And in Spring XML using the id attribute:
<route id="myRoute">
<from uri="direct:start"/>
<to uri="mock:bar"/>
</route>
|