List of usage examples for org.springframework.web.context ConfigurableWebApplicationContext getResource
Resource getResource(String location);
From source file:org.cloudfoundry.identity.uaa.config.YamlServletProfileInitializer.java
private Resource getResource(ServletContext servletContext, ConfigurableWebApplicationContext applicationContext, String locations) { Resource resource = null;/* w w w . j av a2 s . c o m*/ String[] configFileLocations = locations == null ? DEFAULT_PROFILE_CONFIG_FILE_LOCATIONS : StringUtils.commaDelimitedListToStringArray(locations); for (String location : configFileLocations) { location = applicationContext.getEnvironment().resolvePlaceholders(location); servletContext.log("Testing for YAML resources at: " + location); resource = applicationContext.getResource(location); if (resource != null && resource.exists()) { break; } } return resource; }