use of com.cloud.spring.module.model.impl.DefaultModuleDefinition in project cosmic by MissionCriticalCloud.
the class ClasspathModuleDefinitionLocator method discoverModules.
protected Map<String, ModuleDefinition> discoverModules(final String baseDir, final ResourcePatternResolver resolver) throws IOException {
final Map<String, ModuleDefinition> result = new HashMap<>();
for (final Resource r : resolver.getResources(ModuleLocationUtils.getModulesLocation(baseDir))) {
final DefaultModuleDefinition def = new DefaultModuleDefinition(baseDir, r, resolver);
def.init();
if (def.isValid()) {
result.put(def.getName(), def);
}
}
return result;
}
Aggregations