title: Optional environment variables in Spring app
body: <p>In my Spring Boot app's <code>application.properties</code> I have this definition:</p>
  
  <pre><code>someProp=${SOME_ENV_VARIABLE}
  </code></pre>
  
  <p>But this is an optional value only set in certain environments, I use it like this</p>
  
  <pre><code>@Value("${someProp:#{null}}")
  private String someProp;
  </code></pre>
  
  <p>Surprisingly I get this error when the env. var doesn't exist<br>
  <code>Could not resolve placeholder 'SOME_ENV_VARIABLE' in string value "${SOME_ENV_VARIABLE}"</code><br>
  I was expecting Spring to just set a blank value if not found in any <code>PropertySource</code>.  </p>
  
  <p>How to make it optional?</p>