title: SpringBootApplication failed to load properties from application.yml file
body: <p>Configuration class,</p>
  
  <pre><code>@Configuration
  public class SpringContext {
  @Bean
  public BlockingQueue&lt;String&gt; queue(@Value("${queue.size}") int queueSize) {
      return new LinkedBlockingQueue&lt;&gt;();
     }
  }
  </code></pre>
  
  <p>Main class,</p>
  
  <pre><code>@SpringBootApplication
  public class SpringContextTest {
  
      public static void main(String[] args) {
          final SpringApplication springApplication = new SpringApplication(SpringContext.class);
          springApplication.setWebEnvironment(false);
          springApplication.run();
          System.out.println("queue.size" + System.getProperty("queue.size"));
      }
  
  }
  </code></pre>
  
  <p>application.yml,</p>
  
  <pre><code>queue.size: 10
  </code></pre>
  
  <p>While starting the main class I'm getting the following error,</p>
  
  <pre><code>Caused by: java.lang.NumberFormatException: For input string: "${queue.size}"
      at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[na:1.8.0_144]
  </code></pre>
  
  <p><strong>I'm I missing some annotations</strong> ?, In my understanding I've used the minimal annotations required for a spring boot application.
  I have seen some similar posts but didn't helped. Also
  tried with <strong>--spring.config.location</strong>.</p>
  
  <p>My Spring starter version: <strong>1.3.6.RELEASE</strong></p>