use of org.springframework.core.env.PropertySource in project bitsquare by bitsquare.
the class BitsquareEnvironment method homeDirProperties.
private PropertySource<?> homeDirProperties() throws Exception {
String location = String.format("file:%s/.bitsquare/bitsquare.properties", getProperty("user.home"));
Resource resource = resourceLoader.getResource(location);
if (!resource.exists())
return new PropertySource.StubPropertySource(BITSQUARE_HOME_DIR_PROPERTY_SOURCE_NAME);
return new ResourcePropertySource(BITSQUARE_HOME_DIR_PROPERTY_SOURCE_NAME, resource);
}
Aggregations