title: How to define default null value in application.yml in Spring Boot
body: <p>I'm trying to define the default value as null value in application.yml with SpringBoot version 1.3.0.RELEASE. The goal is be able to refer it with a class with <code>ConfigurationProperties</code> annotation</p>
  
  <pre><code>-- application.yml --
  test.foo: ${test.bar:#{null}}
  </code></pre>
  
  <p>but it doesn't work.</p>
  
  <p>If the value of <code>test.bar</code> is not defined, set <code>test.foo</code> to null (default value)</p>
  
  <p>I already have spring-el in my dependencies. I don't want to use <code>PropertyPlaceholderConfigurer.setNullValue</code></p>
  
  <p>It's seem to work in <code>@Value</code> but not in <code>application.yml</code> (see <a href="http://farenda.com/spring/spring-inject-null-value/" rel="noreferrer">http://farenda.com/spring/spring-inject-null-value/</a>)</p>
  
  <p>It's a bug, or yaml is not designed for that?
  I tried all values in <a href="http://yaml.org/type/null.html" rel="noreferrer">http://yaml.org/type/null.html</a> but it doesn't worked either</p>
  
  <p>Thanks</p>