title: Typesafe config - parse from map/file and resolve
body: <p>I can resolve substitutions when I parse config from string, but not when parsing from map or file.</p>
  
  <pre><code>import java.io.File
  import com.typesafe.config.{Config, ConfigFactory}
  import scala.collection.JavaConversions.mapAsJavaMap
  
  val s: String = "a = test, b = another ${a}"
  val m: Map[String, String] = Map("a" -&gt; "test", "b" -&gt; "another ${a}")
  val f: File = new File("test.properties") // contains "a = test\nb = another ${a}"
  
  val cs: Config = ConfigFactory.parseString(s).resolve
  val cm: Config = ConfigFactory.parseMap(mapAsJavaMap(m)).resolve
  val cf: Config = ConfigFactory.parseFile(f).resolve
  
  println("b from string = " + cs.getString("b"))
  println("b from map = " + cm.getString("b"))
  println("b from file = " + cf.getString("b"))
  
  &gt; b from string = another test
  &gt; b from map = another ${a}
  &gt; b from file = another ${a}
  </code></pre>
  
  <p>When I do not resolve immediately it's visible that variable placeholders are not really treated the same way:</p>
  
  <pre><code>val cs: Config = ConfigFactory.parseString(s)
  val cm: Config = ConfigFactory.parseMap(mapAsJavaMap(m))
  val cf: Config = ConfigFactory.parseFile(f)
  
  &gt; cs: com.typesafe.config.Config = Config(SimpleConfigObject({"a":"test","b":"another "${a}}))
  &gt; cm: com.typesafe.config.Config = Config(SimpleConfigObject({"a":"test","b":"another ${a}"}))
  &gt; cf: com.typesafe.config.Config = Config(SimpleConfigObject({"a":"test","b":"another ${a}"}))
  </code></pre>
  
  <p>I could maybe just convert map/file to string, but is there a way to make the library handle it?</p>