SettingsManager.java 文件源码

java
阅读 30 收藏 0 点赞 0 评论 0

项目:settings4j 作者:
private static void initializeRepository(final String configurationFile) throws FactoryConfigurationError {
    LOG.debug("Using URL [{}] for automatic settings4j configuration.", configurationFile);

    final URL url = ClasspathContentResolver.getResource(configurationFile);

    // If we have a non-null url, then delegate the rest of the
    // configuration to the DOMConfigurator.configure method.
    if (url != null) {
        LOG.info("The settings4j will be configured with the config: {}", url);
        try {
            DOMConfigurator.configure(url, getSettingsRepository());
        } catch (final NoClassDefFoundError e) {
            LOG.warn("Error during initialization {}", configurationFile, e);
        }
    } else {
        if (SettingsManager.DEFAULT_FALLBACK_CONFIGURATION_FILE.equals(configurationFile)) {
            LOG.error("Could not find resource: [{}].", configurationFile);
        } else {
            LOG.debug("Could not find resource: [{}]. Use default fallback.", configurationFile);
        }
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号