title: Can we declare spring bean conditionally?
body: <p>Is there a way we can declare a Spring bean conditionally like:</p>
  
  <pre><code>&lt;bean class="path.to.the.class.MyClass" if="${1+2=3}" /&gt;
  </code></pre>
  
  <p>It would be useful instead of having to use profiles.
  I don't have a specific use-case in mind, but it came to me.</p>