public BootApplicationConfigurationMetadataResolver(ClassLoader parent) { this.parent = parent; JarFile.registerUrlProtocolHandler(); try { Resource[] globalResources = new PathMatchingResourcePatternResolver( ApplicationConfigurationMetadataResolver.class.getClassLoader()).getResources(WHITELIST_PROPERTIES); loadWhiteLists(globalResources, globalWhiteListedClasses, globalWhiteListedProperties); } catch (IOException e) { throw new RuntimeException("Error reading global white list of configuration properties", e); } }
public BootApplicationConfigurationMetadataResolver(ClassLoader parent) { this.parent = parent; JarFile.registerUrlProtocolHandler(); try { Resource[] globalResources = new PathMatchingResourcePatternResolver(ApplicationConfigurationMetadataResolver.class.getClassLoader()).getResources(WHITELIST_PROPERTIES); loadWhiteLists(globalResources, globalWhiteListedClasses, globalWhiteListedProperties); } catch (IOException e) { throw new RuntimeException("Error reading global white list of configuration properties", e); } }
public BootApplicationConfigurationMetadataResolver(ClassLoader parent) { this.parent = parent; JarFile.registerUrlProtocolHandler(); try { // read both formats and concat Resource[] globalLegacyResources = new PathMatchingResourcePatternResolver( ApplicationConfigurationMetadataResolver.class.getClassLoader()) .getResources(WHITELIST_LEGACY_PROPERTIES); Resource[] globalResources = new PathMatchingResourcePatternResolver( ApplicationConfigurationMetadataResolver.class.getClassLoader()) .getResources(WHITELIST_PROPERTIES); loadWhiteLists(concatArrays(globalLegacyResources, globalResources), globalWhiteListedClasses, globalWhiteListedProperties); } catch (IOException e) { throw new RuntimeException("Error reading global white list of configuration properties", e); } }
public static synchronized void start(String[] args) throws Exception { warlauncher = new MidPointWarLauncher(); try { JarFile.registerUrlProtocolHandler(); classLoader = warlauncher.createClassLoader(warlauncher.getClassPathArchives()); warlauncher.launch(args, warlauncher.getMainClass(), classLoader, true); } catch (Exception ex) { StringBuilder sb = new StringBuilder(); sb.append("Could not start MidPoint application").append(";").append(ex.getLocalizedMessage()); throw new Exception(sb.toString(), ex); } }
/** * Launch the application. This method is the initial entry point that should be * called by a subclass {@code public static void main(String[] args)} method. * @param args the incoming arguments * @throws Exception if the application fails to launch */ protected void launch(String[] args) throws Exception { JarFile.registerUrlProtocolHandler(); ClassLoader classLoader = createClassLoader(getClassPathArchives()); launch(args, getMainClass(), classLoader); }