title: Springboot Unable to Read Yaml config
body: <p>I am trying out a few things about YAML configuration, seems like I am missing something.</p>
  <p>Below is my controller class and Yaml file.</p>
  <p>HomeController.java</p>
  <pre><code>@Controller
  @PropertySource(&quot;file:${user.dir}/config/webappdemo.yml&quot;)
  public class HomeController {
      
      @Value(&quot;${app.message}&quot;)
      private String appMessage;
  
      @GetMapping(&quot;/home&quot;)
      @ResponseBody
      public String homePage() {
          return this.appMessage;
      }
  }
  </code></pre>
  <p>webappdemo.yml</p>
  <pre><code>app:
     message: hello
  </code></pre>
  <p>My application failing to start, with the below exception:</p>
  <pre><code>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'homeController': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'app.message' in value &quot;${app.message}&quot;
      at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:405) ~[spring-beans-5.3.9.jar:5.3.9]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1413) ~[spring-beans-5.3.9.jar:5.3.9]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601) ~[spring-beans-5.3.9.jar:5.3.9]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524) ~[spring-beans-5.3.9.jar:5.3.9]
      at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.9.jar:5.3.9]
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.9.jar:5.3.9]
  </code></pre>
  <p>From the error message I can feel, because of some reason, It's not able to find that property
  If I modify the property file as below, Its working, Please help me identify the issue:</p>
  <p>webappdemo.yml</p>
  <pre><code>app.message=hello
  </code></pre>