public abstract class AbstractPathPropertySourceProvider extends Object implements PropertySourceProvider
| Constructor and Description |
|---|
AbstractPathPropertySourceProvider(String... resourcePaths)
Creates a new instance using the given resource paths.
|
| Modifier and Type | Method and Description |
|---|---|
static PropertySource |
createPropertiesPropertySource(URL url)
Utility method that reads a .properties file from the given url and creates a corresponding
PropertySource. |
Collection<PropertySource> |
getPropertySources() |
protected abstract Collection<PropertySource> |
getPropertySources(URL url)
Factory method that creates a
PropertySource based on the URL found by
the resource locator. |
public AbstractPathPropertySourceProvider(String... resourcePaths)
resourcePaths - the resource paths, not null, not empty.public Collection<PropertySource> getPropertySources()
getPropertySources in interface PropertySourceProviderprotected abstract Collection<PropertySource> getPropertySources(URL url)
PropertySource based on the URL found by
the resource locator.url - the URL, not null.PropertySources to be included into the current provider's sources
list. It is safe to return null here, in case the content of the URL has shown to be not relevant
as configuration input. In case the input is not valid or accessible an exception can be thrown or logged.public static PropertySource createPropertiesPropertySource(URL url)
PropertySource.url - the url to read, not null.Copyright © 2014–2015 Apache Software Foundation. All rights reserved.