title: How does one convert application.properties to application.yml for maps
body: <p>I tried this, it doesn't work, where am I going wrong?</p>
  
  <p>application.properties (works fine)</p>
  
  <pre><code>document-contact={name:'joe',email:'joe.bloggs@gmail.com'}
  </code></pre>
  
  <p>application.yml (doesn't work; stacktrace below)</p>
  
  <pre><code>document-contact:
    name: 'joe'
    email: 'joe.bloggs@gmail.com'
  </code></pre>
  
  <p>Java:</p>
  
  <pre><code>    @Value("#{${document-contact}}")
      private Map&lt;String, String&gt; contact;
  </code></pre>
  
  <p>Stacktrace:</p>
  
  <pre><code>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'consolidatedSwaggerDocumentationController': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'document-contact' in value "#{${document-contact}}"
      at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:403) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1429) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]
  </code></pre>