Skip to content

Instantly share code, notes, and snippets.

@123avi
123avi / ConfigUtils.scala
Last active May 9, 2018 12:50
Handling config idiomatically
import com.typesafe.config.ConfigException.Missing
import com.typesafe.config._
import org.slf4j.{Logger, LoggerFactory}
import scala.concurrent.duration.{FiniteDuration, TimeUnit}
import scala.language.{implicitConversions, postfixOps}
import scala.util.Try
import scala.util.matching.Regex
trait ConfExtractor[A]{
def getConf(key:String):A