@Override public ClassPathScanner createScanner(ClassLoader classLoader) { return new Scanner(classLoader); } }
private boolean readResourcesForPath(String path) { ClassLoader classLoader = migrationConfig.getClassLoader(); Scanner scanner = new Scanner(classLoader); List<Resource> resourceList = scanner.scanForResources(path, new Match(migrationConfig)); logger.debug("resources: {}", resourceList); for (Resource resource : resourceList) { String filename = resource.getFilename(); if (filename.endsWith(migrationConfig.getApplySuffix())) { versions.add(createScriptMigration(resource, filename)); } else if (migrationConfig.getJdbcMigrationFactory() != null && filename.endsWith(".class")) { versions.add(createJdbcMigration(resource, filename)); } } Collections.sort(versions); return !versions.isEmpty(); }