Example usage for org.springframework.web.context ConfigurableWebApplicationContext getConfigLocations

List of usage examples for org.springframework.web.context ConfigurableWebApplicationContext getConfigLocations

Introduction

In this page you can find the example usage for org.springframework.web.context ConfigurableWebApplicationContext getConfigLocations.

Prototype

@Nullable
String[] getConfigLocations();

Source Link

Document

Return the config locations for this web application context, or null if none specified.

Usage

From source file:nl.tue.gale.ae.config.GaleContextLoader.java

@Override
protected void customizeContext(ServletContext sc, ConfigurableWebApplicationContext ac) {
    super.customizeContext(sc, ac);
    ArrayList<String> locations = new ArrayList<String>();
    locations.addAll(Arrays.asList(ac.getConfigLocations()));
    findLocations(sc, locations);/*from w  w  w.  ja va  2s . c  om*/
    ac.setConfigLocations(locations.toArray(new String[] {}));
}

From source file:org.openlegacy.web.OpenLegacyDispatcherServlet.java

@Override
protected void configureAndRefreshWebApplicationContext(ConfigurableWebApplicationContext wac) {
    PluginsRegistry pluginsRegistry = DefaultPluginsLoader.create().load().getPluginsRegistry();

    if (!pluginsRegistry.isEmpty()) {
        List<String> locations = new LinkedList<String>(Arrays.asList(wac.getConfigLocations()));
        locations.addAll(pluginsRegistry.getSpringWebContextResources());
        wac.setConfigLocations(locations.toArray(new String[] {}));
        if (logger.isDebugEnabled()) {
            logger.debug("Modified config locations of web application context");
        }/*from  ww  w  . j a v a 2s . c  o m*/
    }

    super.configureAndRefreshWebApplicationContext(wac);
}