Hi David, It looks like Spring allows you to scan the classpath for bean definitions to import, using wildcards, e.g.:
<import resource="classpath:./camel-route-*.xml" /> So you can potentially import many routeContext definitions into your registry in a batch. However, it looks like the <routeContextDef /> currently requires the name of the RouteContext bean to import. Unless someone else has another suggestion, I would recommend you open a JIRA to extend the <routeContextDef /> element with something like an scanRegistry="true" attribute to trigger a search in the Registry for RouteContext definitions to import. Regards, Raúl. On 20 December 2011 19:39, db <[email protected]> wrote: > Hello > > I need to externalise mappings with Spring XML as per the example here: > http://camel.apache.org/how-do-i-import-routes-from-other-xml-files.html > > I'm after a solution that automatically adds all configured routes to my > single Camel context. > > It seems that Camel has a <packageScan> feature which does what I need but > I > can't see how to make this work with XML configured routes. > > Does anyone have a solution? > > Thanks > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Dynamically-loading-XML-configured-routes-tp5089872p5089872.html > Sent from the Camel - Users mailing list archive at Nabble.com. >
