Class SpincastConfigPluginConfigDefault
- All Implemented Interfaces:
- SpincastConfigPluginConfig
WARNING : Beware of circular dependencies here... In general, this component should not depend on anything else, since pretty much all other components depend on it.
 One dependency you can use, is 
 @MainArgs String[] 
 (or @MainArgs List<String>) to get access to
 the application arguments.
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionThe path to a configuration file to load from the classpath.The allowed prefixes an environment variable can have to be used as a configuration.The path to a configuration file to load from the file system.The allowed prefixes a system property can have to be used as a configuration.booleanShould the prefix of an environment variable be stripped? For example, if#environmentVariablesPrefixesindicates that "app." is an environment variable prefix, then "app.admin.email" will result in a "admin.email" key.booleanIf an external configuration file is used and environment variables too, should configurations from the file override those from environment variables?booleanShould the prefix of an system property be stripped? For example, if#systemPropertiesPrefixesindicates that "app." is an system property prefix, then "app.admin.email" will result in a "admin.email" key.booleanShould an exception be thrown if a classpath config file is specified (is notnull) but is not found.booleanShould an exception be thrown if an external config file is specified (is notnull) but is not found.
- 
Field Details- 
CONFIG_FILE_NAME_DEFAULT- See Also:
 
- 
PREFIX_DEFAULT- See Also:
 
 
- 
- 
Constructor Details- 
SpincastConfigPluginConfigDefaultpublic SpincastConfigPluginConfigDefault()
 
- 
- 
Method Details- 
getClasspathFilePathDescription copied from interface:SpincastConfigPluginConfigThe path to a configuration file to load from the classpath.Defaults to " app-config.yaml". This means you can simply create that file in your/src/main/resources/folder and it will be used.- Specified by:
- getClasspathFilePathin interface- SpincastConfigPluginConfig
 
- 
getExternalFilePathDescription copied from interface:SpincastConfigPluginConfigThe path to a configuration file to load from the file system.The path can be relative or absolute. Spincast will check this using : File configFile = new File(thePath); if(configFile.isAbsolute()) {...}If the path is relative, it is from the executable .jar. Defaults to " app-config.yaml".- Specified by:
- getExternalFilePathin interface- SpincastConfigPluginConfig
 
- 
getEnvironmentVariablesPrefixesDescription copied from interface:SpincastConfigPluginConfigThe allowed prefixes an environment variable can have to be used as a configuration.Defaults to "app.".- Specified by:
- getEnvironmentVariablesPrefixesin interface- SpincastConfigPluginConfig
- Returns:
- the allowed prefixes or nullto disable environment variables as a source for configurations.
 
- 
isEnvironmentVariablesStripPrefixpublic boolean isEnvironmentVariablesStripPrefix()Description copied from interface:SpincastConfigPluginConfigShould the prefix of an environment variable be stripped? For example, if#environmentVariablesPrefixesindicates that "app." is an environment variable prefix, then "app.admin.email" will result in a "admin.email" key.Defaults to false.- Specified by:
- isEnvironmentVariablesStripPrefixin interface- SpincastConfigPluginConfig
 
- 
getSystemPropertiesPrefixesDescription copied from interface:SpincastConfigPluginConfigThe allowed prefixes a system property can have to be used as a configuration.Defaults to "app.".- Specified by:
- getSystemPropertiesPrefixesin interface- SpincastConfigPluginConfig
- Returns:
- the allowed prefixes or nullto disable system properties as a source for configurations.
 
- 
isSystemPropertiesStripPrefixpublic boolean isSystemPropertiesStripPrefix()Description copied from interface:SpincastConfigPluginConfigShould the prefix of an system property be stripped? For example, if#systemPropertiesPrefixesindicates that "app." is an system property prefix, then "app.admin.email" will result in a "admin.email" key.Defaults to false.- Specified by:
- isSystemPropertiesStripPrefixin interface- SpincastConfigPluginConfig
 
- 
isExternalFileConfigsOverrideEnvironmentVariablespublic boolean isExternalFileConfigsOverrideEnvironmentVariables()Description copied from interface:SpincastConfigPluginConfigIf an external configuration file is used and environment variables too, should configurations from the file override those from environment variables?The default is false: environment variables have priority.- Specified by:
- isExternalFileConfigsOverrideEnvironmentVariablesin interface- SpincastConfigPluginConfig
 
- 
isThrowExceptionIfSpecifiedClasspathConfigFileIsNotFoundpublic boolean isThrowExceptionIfSpecifiedClasspathConfigFileIsNotFound()Description copied from interface:SpincastConfigPluginConfigShould an exception be thrown if a classpath config file is specified (is notnull) but is not found.If set to false, a message will be logged but no exception will be thrown.Defaults to false.- Specified by:
- isThrowExceptionIfSpecifiedClasspathConfigFileIsNotFoundin interface- SpincastConfigPluginConfig
 
- 
isThrowExceptionIfSpecifiedExternalConfigFileIsNotFoundpublic boolean isThrowExceptionIfSpecifiedExternalConfigFileIsNotFound()Description copied from interface:SpincastConfigPluginConfigShould an exception be thrown if an external config file is specified (is notnull) but is not found.If set to false, a message will be logged but no exception will be thrown.Defaults to false.- Specified by:
- isThrowExceptionIfSpecifiedExternalConfigFileIsNotFoundin interface- SpincastConfigPluginConfig
 
 
-