Class/Object

io.github.setl.config

ConfigLoader

Related Docs: object ConfigLoader | package config

Permalink

abstract class ConfigLoader extends Logging

ConfigLoader loads configurations by using typesafe.com's config library.

You should set the application environment, then ConfigLoad will read the configuration file [app_env].conf in your resources directory.

Multiple solutions are possible to configure application environment:

- Otherwise you can set the JVM property app.environment. For example, by adding -Dapp.environment=local in your command, ConfigLoader will read the conf file local.conf

- You can also create app.environment in the default configuration file (example: application.conf, application.properties)

The priority of the above solution is:

configPath >> setAppEnv >> JVM property >> `app.environment` in default config file

If none of the above parameters are set, ConfigLoader will try to read its fallback configuration file

Annotations
@Evolving()
Linear Supertypes
Logging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ConfigLoader
  2. Logging
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ConfigLoader()

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def appEnv: String

    Permalink
  5. val appName: String

    Permalink
  6. var applicationEnvironment: Option[String]

    Permalink
    Attributes
    protected
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def beforeAll(): Unit

    Permalink

    BeforeAll will be called before loading the typesafe config file.

    BeforeAll will be called before loading the typesafe config file. User can override it with property settings

  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. lazy val config: Config

    Permalink

    Config loaded from filesystem

  11. val configPath: Option[String]

    Permalink
  12. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def get(key: String): String

    Permalink

    Get the value of a key

    Get the value of a key

    key

    path expression

    returns

    the string value at the requested path

    Exceptions thrown

    ConfigException.Missing if value is absent or null

    ConfigException.WrongType if value is not convertible to an Enum

  16. def getAppEnvFromJvmProperties: Option[String]

    Permalink
  17. def getArray(key: String): Array[String]

    Permalink

    Get the value of a key

    Get the value of a key

    key

    path expression

    returns

    the Array[String] value at the requested path

  18. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  19. def getConfig(key: String): Config

    Permalink

    Get the value of a key

    Get the value of a key

    key

    path expression

    returns

    the nested Config value at the requested path

  20. def getConfigPath: String

    Permalink
  21. def getObject(key: String): ConfigObject

    Permalink

    Get the value of a key

    Get the value of a key

    key

    path expression

    returns

    the ConfigObject value at the requested path

  22. def getOption(key: String): Option[String]

    Permalink

    Get the value of a key

    Get the value of a key

    key

    path expression

    returns

    Option[String] if the key exists, None otherwise

  23. def has(key: String): Boolean

    Permalink

    Check if a key is presented in a config

    Check if a key is presented in a config

    key

    path expression

    returns

    true if the config contains the key, otherwise false

  24. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  25. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  26. def log: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  27. def logDebug(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  28. def logError(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  29. def logInfo(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  30. def logName: String

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  31. def logTrace(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  32. def logWarning(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  33. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  34. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  35. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  36. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  37. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  38. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped