title: Yaml properties as a Map in Spring Boot
body: <p>We have a <code>spring-boot</code> project and are using <code>application.yml</code> files. This works exactly as described in the <code>spring-boot</code> documentation. <code>spring-boot</code> automatically looks in several locations for the files, and obeys any environment overrides we use for the location of those files.</p>
  
  <p>Now we want to also expose those <code>yaml</code> properties as a Map. According to the <a href="http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#boot-features-external-config-yaml" rel="nofollow">documentation</a> this can be done with <code>YamlMapFactoryBean</code>. However <code>YamlMapFactoryBean</code> wants me to specify which <code>yaml</code> files to use via the <code>resources</code> property. I want it to use the same <code>yaml</code> files and processing hierarchy that it used when creating properties, so that I can take still take advantage of "magical" features such as placeholder resolution in property values.</p>
  
  <p>I didn't see any documentation on if this was possible.
  I was thinking of writing a MapFactoryBean that looked at the <code>environment</code> and simply reversed the "flattening" performed by the <code>YamlProcessor</code> when creating the <code>properties</code> representation of the file.</p>
  
  <p>Any other ideas?</p>