Packages

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 last solution is to overwrite directly the value of confPath with the name of you configuration file. Then ConfigLoader will read directly the given file

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

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. def appEnv: String
  5. val appName: String
  6. var applicationEnvironment: Option[String]
    Attributes
    protected
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def beforeAll(): Unit

    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
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  10. lazy val config: Config

    Config loaded from filesystem

  11. val configPath: Option[String]
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def get(key: String): String

    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]
  17. def getArray(key: String): Array[String]

    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[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. def getConfig(key: String): Config

    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
  21. def getObject(key: String): ConfigObject

    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]

    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

    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
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  25. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  26. def log: Logger
    Attributes
    protected
    Definition Classes
    Logging
  27. def logDebug(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  28. def logError(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  29. def logInfo(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  30. def logName: String
    Attributes
    protected
    Definition Classes
    Logging
  31. def logTrace(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  32. def logWarning(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  33. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  34. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  35. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  36. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  37. def toString(): String
    Definition Classes
    AnyRef → Any
  38. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped