All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.johnsnowlabs.util.ConfigLoader.scala Maven / Gradle / Ivy

There is a newer version: 1.6.2
Show newest version
package com.johnsnowlabs.util

import java.io.File

import com.typesafe.config.{Config, ConfigFactory}

object ConfigLoader {

  private val defaultConfig = ConfigFactory.load()
  private var overrideConfigPath = defaultConfig.getString("settings.overrideConfigPath")

  def setConfigPath(path: String): Unit = overrideConfigPath = path

  def getConfigPath: String = overrideConfigPath

  def retrieve: Config = ConfigFactory
    .parseFile(new File(overrideConfigPath))
    .withFallback(defaultConfig)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy