title: Lazy-Init based on a flag
body: <p>Here's my requirement:</p>
  
  <p>At Spring context startup, I would like to call a method on my bean X. But the method call is dependent upon environment. One should be able to disable it. I am trying to use lazy-init function on the bean but unable to configure it so that the value is read from the properties file.</p>
  
  <pre><code>&lt;bean lazy-init="${isEnabled}" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"&gt;
  </code></pre>
  
  <p>But on context startup, Spring is unable to understand the <code>${isenabled}</code> flag. Is there an alternative way to configure this ?</p>