|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.commons.configuration.event.EventSource
org.apache.commons.configuration.AbstractConfiguration
com.netflix.config.ConcurrentMapConfiguration
com.netflix.config.ClasspathPropertiesConfiguration
public class ClasspathPropertiesConfiguration
A Conventional Standard based approach to modular configuration Assuming your application utilizes many modules (.jar files) and need Properties support, this class provides a convention based approach to scanning and loading properties from every jar in a classpath from a specific location. All modules are assumed to have properties in a location such as META-INF/conf/configuration.properties. Such resources may be anywhere in the classpath; for example in directories for a unit test or application. Parameters from such resources are contained in a Configuration whose name is usually the name of the .jar; for example "com.netflix.movieserviceclient.jar". For a resource not in a .jar, the Configuration name is the URL of the directory that contains the resource. However, if the resource contains a property named conf.configName, its value will be used as the Configuration name.
Such properties are often used in Spring, by defining a PropertyPlaceholderConfigurer that gets parameter values from ClasspathConfiguration.getProperties().
| Field Summary |
|---|
| Fields inherited from class com.netflix.config.ConcurrentMapConfiguration |
|---|
DISABLE_DELIMITER_PARSING, map |
| Fields inherited from class org.apache.commons.configuration.AbstractConfiguration |
|---|
END_TOKEN, EVENT_ADD_PROPERTY, EVENT_CLEAR, EVENT_CLEAR_PROPERTY, EVENT_READ_PROPERTY, EVENT_SET_PROPERTY, START_TOKEN |
| Method Summary | |
|---|---|
java.lang.String |
getConfigNameProperty()
Deprecated. |
java.util.Properties |
getProperties()
Returns properties from this configuration |
java.lang.String |
getPropertiesResourceRelativePath()
|
static void |
initialize()
|
static void |
setConfigNameProperty(java.lang.String configNameProperty)
Deprecated. |
static void |
setPropertiesResourceRelativePath(java.lang.String propertiesResourceRelativePath)
Set relative class path for the config file |
| Methods inherited from class com.netflix.config.ConcurrentMapConfiguration |
|---|
addConfigurationListener, addErrorListener, addProperty, addPropertyDirect, addPropertyImpl, clear, clearConfigurationListeners, clearErrorListeners, clearPropertyDirect, containsKey, copy, fireError, fireEvent, getConfigurationListeners, getErrorListeners, getKeys, getProperty, isEmpty, loadProperties, removeConfigurationListener, removeErrorListener, setProperty, setPropertyImpl |
| Methods inherited from class org.apache.commons.configuration.AbstractConfiguration |
|---|
addErrorLogListener, append, clearProperty, createInterpolator, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getDefaultListDelimiter, getDelimiter, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getInt, getInt, getInteger, getInterpolator, getKeys, getList, getList, getListDelimiter, getLogger, getLong, getLong, getLong, getProperties, getProperties, getShort, getShort, getShort, getString, getString, getStringArray, getSubstitutor, interpolate, interpolate, interpolatedConfiguration, interpolateHelper, isDelimiterParsingDisabled, isScalarValue, isThrowExceptionOnMissing, resolveContainerStore, setDefaultListDelimiter, setDelimiter, setDelimiterParsingDisabled, setListDelimiter, setLogger, setThrowExceptionOnMissing, subset |
| Methods inherited from class org.apache.commons.configuration.event.EventSource |
|---|
clone, createErrorEvent, createEvent, isDetailEvents, setDetailEvents |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
@Deprecated public java.lang.String getConfigNameProperty()
@Deprecated public static void setConfigNameProperty(java.lang.String configNameProperty)
configNameProperty - public java.lang.String getPropertiesResourceRelativePath()
public static void setPropertiesResourceRelativePath(java.lang.String propertiesResourceRelativePath)
propertiesResourceRelativePath - New relative path of config filepublic java.util.Properties getProperties()
getProperties in class ConcurrentMapConfigurationpublic static void initialize()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||