Camel如何由路由导出xml-dsl
将java-dsl(路由定义)导出为xml-dsl的方法:
List<RouteDefinition> routes = context.getRouteDefinitions();
RoutesDefinition def = new RoutesDefinition();
def.setRoutes(routes);
final String xml = context.adapt(ExtendedCamelContext.class).getModelToXMLDumper().dumpModelAsXml(context, def);