/** * Search the classPath for the classes we are interested in. */ private BootupClasses getBootupClasses() { try { BootupClasses bc = new BootupClasses(); long st = System.currentTimeMillis(); for (ClassPathScanner finder : this.scanners) { if (packages != null && !packages.isEmpty()) { for (String packageName : packages) { finder.scanForClasses(packageName, bc); } } else { // scan locally finder.scanForClasses("", bc); } } long searchTime = System.currentTimeMillis() - st; logger.debug("Classpath search entities[{}] searchTime[{}] in packages[{}]", bc.getEntities().size(), searchTime, packages); return bc; } catch (Exception ex) { throw new RuntimeException("Error in classpath search (looking for entities etc)", ex); } }
private List<Resource> xmlMappingResources() { List<ClassPathScanner> scanners = ClassPathScanners.find(serverConfig); List<String> mappingLocations = serverConfig.getMappingLocations(); List<Resource> resourceList = new ArrayList<>(); long st = System.currentTimeMillis(); if (mappingLocations != null && !mappingLocations.isEmpty()) { for (ClassPathScanner finder : scanners) { for (String mappingLocation : mappingLocations) { resourceList.addAll(finder.scanForResources(mappingLocation, resourceName -> resourceName.endsWith(".xml"))); } } } long searchTime = System.currentTimeMillis() - st; log.debug("Classpath search mappings[{}] searchTime[{}]", resourceList.size(), searchTime); return resourceList; }
/** * Search the classPath for the classes we are interested in. */ private BootupClasses getBootupClasses() { try { BootupClasses bc = new BootupClasses(); long st = System.currentTimeMillis(); for (ClassPathScanner finder : this.scanners) { if (packages != null && !packages.isEmpty()) { for (String packageName : packages) { finder.scanForClasses(packageName, bc); } } else { // scan locally finder.scanForClasses("", bc); } } long searchTime = System.currentTimeMillis() - st; logger.info("Classpath search entities[{}] searchTime[{}] in packages[{}]", bc.getEntities().size(), searchTime, packages); return bc; } catch (Exception ex) { throw new RuntimeException("Error in classpath search (looking for entities etc)", ex); } }
private List<Resource> xmlMappingResources() { List<ClassPathScanner> scanners = ClassPathScanners.find(serverConfig); List<String> mappingLocations = serverConfig.getMappingLocations(); List<Resource> resourceList = new ArrayList<>(); long st = System.currentTimeMillis(); if (mappingLocations != null && !mappingLocations.isEmpty()) { for (ClassPathScanner finder : scanners) { for (String mappingLocation : mappingLocations) { resourceList.addAll(finder.scanForResources(mappingLocation, resourceName -> resourceName.endsWith(".xml"))); } } } long searchTime = System.currentTimeMillis() - st; log.debug("Classpath search mappings[{}] searchTime[{}]", resourceList.size(), searchTime); return resourceList; }
/** * Search the classPath for the classes we are interested in. */ private BootupClasses getBootupClasses() { try { BootupClasses bc = new BootupClasses(); long st = System.currentTimeMillis(); for (ClassPathScanner finder : this.scanners) { if (packages != null && !packages.isEmpty()) { for (String packageName : packages) { finder.scanForClasses(packageName, bc); } } else { // scan locally finder.scanForClasses("", bc); } } long searchTime = System.currentTimeMillis() - st; logger.debug("Classpath search entities[{}] searchTime[{}] in packages[{}]", bc.getEntities().size(), searchTime, packages); return bc; } catch (Exception ex) { throw new RuntimeException("Error in classpath search (looking for entities etc)", ex); } }