Example usage for org.springframework.core.io.support ResourcePropertySource ResourcePropertySource

List of usage examples for org.springframework.core.io.support ResourcePropertySource ResourcePropertySource

Introduction

In this page you can find the example usage for org.springframework.core.io.support ResourcePropertySource ResourcePropertySource.

Prototype

private ResourcePropertySource(String name, @Nullable String resourceName, Map<String, Object> source) 

Source Link

Usage

From source file:com.cloudera.director.aws.common.PropertyResolvers.java

private static PropertySource buildPropertySource(String name, String loc, boolean allowMissing)
        throws IOException {
    try {/*from  ww  w  .j a va2s .  co m*/
        return new ResourcePropertySource(name, loc, PropertyResolvers.class.getClassLoader());
    } catch (IOException e) {
        if (allowMissing) {
            return null;
        }
        throw new IOException("Unable to load " + name + " properties from " + loc, e);
    }
}