object ConfigSource

Object containing factory methods for building ConfigSources.

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).

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ConfigSource
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. def default(appSource: ConfigObjectSource): ConfigObjectSource

    A config source for the default loading process in Typesafe Config with a custom application config source.

    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.

    appSource

    the source providing the application config

    returns

    a ConfigObjectSource for the default loading process in Typesafe Config with a custom application config source.

  7. val default: ConfigObjectSource

    A config source for the default loading process in Typesafe Config.

    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).

  8. val defaultApplication: ConfigObjectSource

    A config source for the default application config in Typesafe Config (by default application.conf in resources).

    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.

  9. val defaultOverrides: ConfigObjectSource

    A config source for the default overrides in Typesafe Config (by default a map of system properties).

  10. val defaultReference: ConfigObjectSource

    A config source for the default reference config in Typesafe Config (reference.conf resources provided by libraries).

    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.

  11. val defaultReferenceUnresolved: ConfigObjectSource

    A config source for the default reference config in Typesafe Config (reference.conf resources provided by libraries) before being resolved.

    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.

  12. val empty: ConfigObjectSource

    A config source that always provides empty configs.

  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  15. def file(file: File): ConfigObjectSource

    Returns a config source that provides configs read from a file.

    Returns a config source that provides configs read from a file.

    file

    the file

    returns

    a config source that provides configs read from a file.

  16. def file(path: Path): ConfigObjectSource

    Returns a config source that provides configs read from a file.

    Returns a config source that provides configs read from a file.

    path

    the path to the file

    returns

    a config source that provides configs read from a file.

  17. def file(path: String): ConfigObjectSource

    Returns a config source that provides configs read from a file.

    Returns a config source that provides configs read from a file.

    path

    the path to the file as a string

    returns

    a config source that provides configs read from a file.

  18. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. def fromConfig(conf: Config): ConfigObjectSource

    Returns a config source that provides a fixed Config.

    Returns a config source that provides a fixed Config.

    conf

    the config to be provided

    returns

    a config source that provides the given config.

  20. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  25. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  26. def resources(name: String, classLoader: ClassLoader): ConfigObjectSource

    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.

    name

    the resource name

    classLoader

    the class loader to use to look for resources

    returns

    a config source that provides configs read from JVM resource files.

  27. def resources(name: String): ConfigObjectSource

    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. This method uses Typesafe Config's default class loader (Thread.currentThread().getContextClassLoader()).

    name

    the resource name

    returns

    a config source that provides configs read from JVM resource files.

  28. def string(confStr: String): ConfigObjectSource

    Returns a config source that provides a config parsed from a string.

    Returns a config source that provides a config parsed from a string.

    confStr

    the config content

    returns

    a config source that provides a config parsed from a string.

  29. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  30. val systemProperties: ConfigObjectSource

    A config source for Java system properties.

  31. def toString(): String
    Definition Classes
    AnyRef → Any
  32. def url(url: URL): ConfigObjectSource

    Returns a config source that provides configs read from a URL.

    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.

    url

    the URL

    returns

    a config source that provides configs read from a URL.

  33. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped