Package

com.sksamuel.exts

config

Permalink

package config

Visibility
  1. Public
  2. All

Type Members

  1. trait ConfigSupport extends AnyRef

    Permalink
  2. case class ConfigLoaderParams(overrideConfInUserHome: Boolean = true, overrideConfInWorkingDir: Boolean = true, envConfInWorkingDir: Boolean = true, envConfInClasspath: Boolean = true, envConfInUserHome: Boolean = true, envConfFilename: String = "$ENV.conf", applicationConfName: String = "application.conf", configEnvParameterName: String = "CONFIG_ENV", overrideConfName: String = "override.conf") extends Product with Serializable

    Permalink

    Supports environment and application config in an opinionated way.

    Supports environment and application config in an opinionated way.

    Starting from the lowest priority to the highest:

    - all reference.confs are loaded from the classpath and merged; the order is not defined. - application.conf is loaded from the classpath - ENV.conf is loaded from working dir, user home, and classpath in that order, and merged. - override.conf is loaded from working dir and user home and merged.

    Override.conf is designed to allow easy, temporary, overrides at runtime for a particular process, and therefore is only ever loaded from the user home and cwd.

    The env config is designed to change between environments. The filename has a placeholder $ENV which is replaced by the value of the system property called by default CONFIG_ENV. If no env is found, it will default to LOCAL.

    Annotations
    @deprecated
    Deprecated

    (Since version 1.47.0) use ConfigResolver

Value Members

  1. object ConfigResolver extends Logging

    Permalink

    Supports environment and application config for microservices in an opinionated way.

    Supports environment and application config for microservices in an opinionated way.

    Starting from the lowest priority to the highest:

    - all reference.confs are loaded from the classpath and merged; the order is not defined.

    - an app_exts.conf is loaded from the classpath and applied on top of the merged reference conf files; this file is meant to contain microservice specific overrides for configuration; config that is required for a microservice but won't necessarily change between environments.

    - next is an environment wide config file 'env_exts.conf' this should be located in the process owner's home folder or can be ommitted; this file is for anything specific to the box, eg hostnames, or paths to installed binaries;

    - lastly, the application specific override config 'override.conf' this should be located in the cwd of the application or can be ommited; it contains config specific to the application at runtime. This is useful to temporarily override values for a specific microservice.

Deprecated Value Members

  1. object ConfigLoader extends Logging

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 1.47.0) use ConfigResolver

Ungrouped