title: PropertyPlaceHolder in spring
body: <p>We access a java property in spring like this:</p>
  
  <pre><code>&lt;property name="fileSizeLimit" value="${someProperty}" /&gt;
  </code></pre>
  
  <p>The bean declares</p>
  
  <pre><code>int fileSizeLimit = 9999;
  </code></pre>
  
  <p><strong>How can I set a default if "someProperty" is missing in the properties-file?</strong></p>
  
  <p>ATM, we get NumberFormatException because spring calls the int-setter with the name of the property "someProperty". When the property is set, everything works fine.</p>
  
  <p><a href="http://static.springsource.org/spring/docs/1.1.5/api/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.html" rel="nofollow">http://static.springsource.org/spring/docs/1.1.5/api/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.html</a> says:</p>
  
  <blockquote>
    <p>Default property values can be defined via "properties", to make overriding definitions 
    in properties files optional. A configurer will also check against system properties 
    (e.g. "user.dir") if it cannot resolve a placeholder with any of the specified 
    properties. This can be customized via "systemPropertiesMode". </p>
  </blockquote>
  
  <p>Does this set the order in which properties are looked up? Where do I configure this?</p>
  
  <p>TIA, Bastl.</p>