Loads any external Spring configuration into the given RuntimeSpringConfiguration object.
@param config The config instance
761068
public static void loadExternalSpringConfig(RuntimeSpringConfiguration config, final GrailsApplication application) {
        if (springGroovyResourcesBeanBuilder == null) {
            try {
                Class<?> groovySpringResourcesClass = null;
                try {
                    groovySpringResourcesClass = ClassUtils.forName(SPRING_RESOURCES_CLASS,
                        application.getClassLoader());
                }
                catch (ClassNotFoundException e) {
                    // ignore
                }
                if (groovySpringResourcesClass != null) {
                    reloadSpringResourcesConfig(config, application, groovySpringResourcesClass);
                }
            }
            catch (Exception ex) {
                LOG.error("[RuntimeConfiguration] Unable to load beans from resources.groovy", ex);
            }
        }
        else {
            if (!springGroovyResourcesBeanBuilder.getSpringConfig().equals(config)) {
                springGroovyResourcesBeanBuilder.registerBeans(config);
            }
        }
    }
1046751
public void load(FileConfiguration config) {
        this.config = config;
        
        try {
            parse();
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
        }
    }
1323174
public void setConfig(Config config) {
        if (mapperHelper == null) {
            mapperHelper = new MapperHelper();
        }
        mapperHelper.setConfig(config);
    }
1321911
public void loadConfig(String config)
        throws IOException
    {
        Properties properties = new Properties();
        Resource resource=Resource.newResource(config);
        properties.load(resource.getInputStream());
        
        _jdbcDriver = properties.getProperty("jdbcdriver");
        _url = properties.getProperty("url");
        _userName = properties.getProperty("username");
        _password = properties.getProperty("password");
        _userTable = properties.getProperty("usertable");
        _userTableKey = properties.getProperty("usertablekey");
        _userTableUserField = properties.getProperty("usertableuserfield");
        _userTablePasswordField = properties.getProperty("usertablepasswordfield");
        _roleTable = properties.getProperty("roletable");
        _roleTableKey = properties.getProperty("roletablekey");
        _roleTableRoleField = properties.getProperty("roletablerolefield");
        _userRoleTable = properties.getProperty("userroletable");
        _userRoleTableUserKey = properties.getProperty("userroletableuserkey");
        _userRoleTableRoleKey = properties.getProperty("userroletablerolekey");
        _cacheTime = new Integer(properties.getProperty("cachetime")).intValue();
        
        if (_jdbcDriver == null || _jdbcDriver.equals("")
            || _url == null || _url.equals("")
            || _userName == null || _userName.equals("")
            || _password == null
            || _cacheTime < 0)
        {
            if(log.isDebugEnabled())log.debug("UserRealm " + getName()
                        + " has not been properly configured");
        }
        _cacheTime *= 1000;
        _lastHashPurge = 0;
        _userSql = "select " + _userTableKey + ","
            + _userTablePasswordField + " from "
            + _userTable + " where "
            + _userTableUserField + " = ?";
        _roleSql = "select r." + _roleTableRoleField
            + " from " + _roleTable + " r, "
            + _userRoleTable + " u where u."
            + _userRoleTableUserKey + " = ?"
            + " and r." + _roleTableKey + " = u."
            + _userRoleTableRoleKey;
    }
440764
private static void loadProperties(Properties properties,InputStream inputStream,boolean internal)
    {
        try
        {
            properties.load(inputStream);
            LibraryConfigurationLoader.closeResource(inputStream);
        }
        catch(Exception exception)
        {
            LibraryConfigurationLoader.closeResource(inputStream);
            String prefix="External";
            if(internal)
            {
                prefix="Internal";
            }
            throw new FaxException(prefix+" "+LibraryConfigurationLoader.CONFIGURATION_FILE_NAME+" not found.",exception);
        }
    }
638639
private static void applyConfigs(final ClassLoader classloader, final GuiceConfig config)
	{
		// Load all the local configs
		for (String configFile : getPropertyFiles(config))
		{
			try
			{
				for (PropertyFile properties : loadConfig(classloader, configFile))
					config.setAll(properties);
			}
			catch (IOException e)
			{
				throw new IllegalArgumentException("Error loading configuration URLs from " + configFile, e);
			}
		}

		// Load the network config (if enabled)
		try
		{
			applyNetworkConfiguration(config);
		}
		catch (Throwable t)
		{
			throw new RuntimeException("Failed to retrieve configuration from network!", t);
		}
	}
796318
public function load(Config $config)
    {
        $config->setDefault(
            [
                'cs_ruleset'     => 'default',
                'cs_dirs'        => 'src',
                'cs_ignore_dirs' => null,
            ]
        );

        $locations = [
            getcwd().'/'.$config['cs_ruleset'],
            getcwd().'/'.$config['cs_ruleset'].'.xml',
            getcwd().'/ruleset'.(('default' === $config['cs_ruleset']) ? '' : ('-'.$config['cs_ruleset'])).'.xml',
            __DIR__.'/../Resources/rulesets/'.$config['cs_ruleset'].'.xml',
        ];

        foreach ($locations as $location) {
            if (is_file($location)) {
                $config['cs_ruleset'] = realpath($location);
                break;
            }
        }

        $codeSnifferConfFile = getcwd().'/vendor/squizlabs/php_codesniffer/CodeSniffer.conf';

        $config['cs_path_to_install'] = [];

        $found = false;

        if (is_file($codeSnifferConfFile)) {
            include $codeSnifferConfFile;
            if (isset($phpCodeSnifferConfig['installed_paths']) && false !== strpos($phpCodeSnifferConfig['installed_paths'], 'vendor/escapestudios/symfony2-coding-standard')) {
                $found = true;
            }
        }

        if (!$found) {
            $config['cs_path_to_install'][] = 'vendor/escapestudios/symfony2-coding-standard';
        }

        $config['cs_path_to_install'] = join(' ', $config['cs_path_to_install']);

        $config->setDefaultItem('commands', 'cs', "#cs,check code convention");
        $config->setDefaultItem('commands', 'csf', "#cs-fix,fix code convention problems");
        $config->setDefaultItem('commands', 'csx', "#cs-summary,display summary of code convention checking");
    }
262955
@Override
    protected synchronized void loadConfiguration() throws IOException {
        LOGGER.info("Loading list of allowed external content locations from {}", configPath);
        try (final Stream<String> stream = Files.lines(Paths.get(configPath))) {
            allowedList = stream.map(line -> normalizePath(line.trim().toLowerCase()))
                    .filter(line -> isAllowanceValid(line))
                    .collect(Collectors.toList());
        }
    }
179540
public function getConfiguration(array $config, ContainerBuilder $container)
    {
        $configuration = parent::getConfiguration($config, $container);
        if (null === $configuration) {
            throw new \RuntimeException('No configuration found');
        }

        return $configuration;
    }
81074
public void setConfig(Map<String, ? extends CacheConfig> config) {
        this.configMap = (Map<String, CacheConfig>) config;
    }
1062030
public final void initConfiguration(String config) {

        m_configuration = config;
        m_configurationMap = CmsStringUtil.splitAsMap(config, "|", ":");
        m_configurationMap.put(CmsContentDefinition.PARAM_INIT_CALL, INIT_FUNCTION_PREFIX + getName());
        m_jsonConfig = new JSONObject(new HashMap<String, Object>(m_configurationMap));
    }
1122321
public function loadConfiguration(array $config = [])
    {
        parent::loadConfiguration($config);
        if (isset($config['auto'])) {
            $this->setAutoLogin((bool) $config['auto']);
        }
        if (isset($config['identityClass'])) {
            $this->setIdentityClass($config['identityClass']);
        }
    }
1233671
public void setConfiguration(VirtualHost config) {
        this.config = config;
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "setConfiguration", "config set ->"+ this.config);
        }
    }
393727
private void parseConfiguration(String config) {

        m_configuration = new HashMap<String, String>();
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(config)) {
            for (String param : config.split(",")) {
                int index = param.indexOf("=");
                if ((index > 0) && (param.length() > (index + 1))) {
                    m_configuration.put(param.substring(0, index), param.substring(index + 1));
                }
            }
        }
    }
291251
protected org.apache.commons.configuration.Configuration getConfiguration() {
        try {
            return ApplicationProperties.get();
        } catch (AtlasException e) {
            throw new RuntimeException("Unable to load configuration: " + ApplicationProperties.APPLICATION_PROPERTIES);
        }
    }
766876
public void configure(String configuration)
        throws IOException
    {

        URL url=Resource.newResource(configuration).getURL();
        if (_configuration!=null && _configuration.equals(url.toString()))
            return;
        if (_configuration!=null)
            throw new IllegalStateException("Already configured with "+_configuration);
        try
        {
            XmlConfiguration config=new XmlConfiguration(url);
            _configuration=url.toString();
            config.configure(this);
        }
        catch(IOException e)
        {
            throw e;
        }
        catch(Exception e)
        {
            log.warn(LogSupport.EXCEPTION,e);
            throw new IOException("Jetty configuration problem: "+e);
        }
    }
949212
public void configure(Configuration config) throws ConfigurationException
    {
        LoggingConfiguration lc = (LoggingConfiguration) config;
        String levelName = lc.getLogLevel(name);
        setLevel(levelName);
    }