*/
protected void findRouteBuilders() throws Exception {
PackageScanClassResolver resolver = getContext().getPackageScanClassResolver();
addPackageElementContentsToScanDefinition();
PackageScanDefinition packageScanDef = getPackageScan();
if (packageScanDef != null && packageScanDef.getPackages().size() > 0) {
// use package scan filter
PatternBasedPackageScanFilter filter = new PatternBasedPackageScanFilter();
// support property placeholders in include and exclude
for (String include : packageScanDef.getIncludes()) {
include = getContext().resolvePropertyPlaceholders(include);
filter.addIncludePattern(include);
}
for (String exclude : packageScanDef.getExcludes()) {
exclude = getContext().resolvePropertyPlaceholders(exclude);
filter.addExcludePattern(exclude);
}
resolver.addFilter(filter);
String[] normalized = normalizePackages(getContext(), packageScanDef.getPackages());
RouteBuilderFinder finder = new RouteBuilderFinder(getContext(), normalized, getContextClassLoaderOnStart(),
getBeanPostProcessor(), getContext().getPackageScanClassResolver());
finder.appendBuilders(builders);
}
}