Typesafe config: Load additional config from path external to packaged scala application
Solution 1:
I think what you want is:
val myCfg = ConfigFactory.parseFile(new File("my_path/hdfs.conf"))
Solution 2:
If your external configuration is to add to or override configuration parameters from standard locations, you can do the following:
val baseConfig = ConfigFactory.load()
val config = ConfigFactory.parseFile(yourFile).withFallback(baseConfig)
where yourFile
is a java.io.File
Documentation reference here
Solution 3:
val config = ConfigFactory.load("pathtoFile/FileName.propertes")
works, too.