Object containing factory methods for building ConfigSource
s.
The sources provided here use Typesafe Config configs created from files, resources, URLs or strings. It also provides sources that delegate the loading component to Typesafe Config, to leverage reference configs and overrides, making it easy to switch from using ConfigFactory
to ConfigSource
.
Other PureConfig modules may provide other ways or building config sources (e.g. for different config formats or data sources).
Attributes
- Companion
- trait
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ConfigSource.type
Members list
Value members
Concrete methods
A config source for the default loading process in Typesafe Config with a custom application config source. Typesafe Config stacks reference.conf
resources provided by libraries, the given file and system property overrides, resolves them and merges them into a single config.
A config source for the default loading process in Typesafe Config with a custom application config source. Typesafe Config stacks reference.conf
resources provided by libraries, the given file and system property overrides, resolves them and merges them into a single config.
This method is provided here to support use cases that previously depended on ConfigFactory.load(config)
. Creating a custom source by merging the layers manually is usually recommended as it makes the config priorities more transparent.
Value parameters
- appSource
-
the source providing the application config
Attributes
- Returns
-
a
ConfigObjectSource
for the default loading process in Typesafe Config with a custom application config source.
Returns a config source that provides configs read from a file.
Returns a config source that provides configs read from a file.
Value parameters
- path
-
the path to the file as a string
Attributes
- Returns
-
a config source that provides configs read from a file.
Returns a config source that provides configs read from a file.
Returns a config source that provides configs read from a file.
Value parameters
- path
-
the path to the file
Attributes
- Returns
-
a config source that provides configs read from a file.
Returns a config source that provides configs read from a file.
Returns a config source that provides configs read from a file.
Value parameters
- file
-
the file
Attributes
- Returns
-
a config source that provides configs read from a file.
Returns a config source that provides a fixed Config
.
Returns a config source that provides a fixed Config
.
Value parameters
- conf
-
the config to be provided
Attributes
- Returns
-
a config source that provides the given config.
Returns a config source that provides configs read from JVM resource files. If multiple files are found, they are merged in no specific order. This method uses Typesafe Config's default class loader (Thread.currentThread().getContextClassLoader()
).
Returns a config source that provides configs read from JVM resource files. If multiple files are found, they are merged in no specific order. This method uses Typesafe Config's default class loader (Thread.currentThread().getContextClassLoader()
).
Value parameters
- name
-
the resource name
Attributes
- Returns
-
a config source that provides configs read from JVM resource files.
Returns a config source that provides configs read from JVM resource files. If multiple files are found, they are merged in no specific order. The given class loader will be used to look for resources.
Returns a config source that provides configs read from JVM resource files. If multiple files are found, they are merged in no specific order. The given class loader will be used to look for resources.
Value parameters
- classLoader
-
the class loader to use to look for resources
- name
-
the resource name
Attributes
- Returns
-
a config source that provides configs read from JVM resource files.
Returns a config source that provides a config parsed from a string.
Returns a config source that provides a config parsed from a string.
Value parameters
- confStr
-
the config content
Attributes
- Returns
-
a config source that provides a config parsed from a string.
Returns a config source that provides configs read from a URL. The URL can either point to a local file or to a remote HTTP location.
Returns a config source that provides configs read from a URL. The URL can either point to a local file or to a remote HTTP location.
Value parameters
- url
-
the URL
Attributes
- Returns
-
a config source that provides configs read from a URL.
Concrete fields
A config source for the default loading process in Typesafe Config. Typesafe Config stacks reference.conf
resources provided by libraries, application configs (by default application.conf
in resources) and system property overrides, resolves them and merges them into a single config. This source is equivalent to defaultOverrides.withFallback(defaultApplication).withFallback(defaultReference)
.
A config source for the default loading process in Typesafe Config. Typesafe Config stacks reference.conf
resources provided by libraries, application configs (by default application.conf
in resources) and system property overrides, resolves them and merges them into a single config. This source is equivalent to defaultOverrides.withFallback(defaultApplication).withFallback(defaultReference)
.
Attributes
A config source for the default application config in Typesafe Config (by default application.conf
in resources). Like Typesafe Config, it provides an empty object if application config files are not found.
A config source for the default application config in Typesafe Config (by default application.conf
in resources). Like Typesafe Config, it provides an empty object if application config files are not found.
Attributes
A config source for the default overrides in Typesafe Config (by default a map of system properties).
A config source for the default overrides in Typesafe Config (by default a map of system properties).
Attributes
A config source for the default reference config in Typesafe Config (reference.conf
resources provided by libraries). Like Typesafe Config, it provides an empty object if reference.conf
files are not found.
A config source for the default reference config in Typesafe Config (reference.conf
resources provided by libraries). Like Typesafe Config, it provides an empty object if reference.conf
files are not found.
As required by the HOCON spec, the default reference files are pre-emptively resolved - substitutions in the reference config aren't affected by application configs.
Attributes
A config source for the default reference config in Typesafe Config (reference.conf
resources provided by libraries) before being resolved. This can be used as an alternative to defaultReference
for use cases that require reference.conf
to depend on application.conf
. Like Typesafe Config, it provides an empty object if reference.conf
files are not found.
A config source for the default reference config in Typesafe Config (reference.conf
resources provided by libraries) before being resolved. This can be used as an alternative to defaultReference
for use cases that require reference.conf
to depend on application.conf
. Like Typesafe Config, it provides an empty object if reference.conf
files are not found.
Attributes
A config source that always provides empty configs.
A config source that always provides empty configs.
Attributes
A config source for Java system properties.
A config source for Java system properties.