title: Creating bean using static method from another class
body: <p>I have a factory class which has various static methods to return the instances of some classes. 
  How can a bean be created in spring using static factory method in different class?</p>
  
  <p>something like:</p>
  
  <pre><code>public class InstanceFactory
  {    
    public static JellyBean getJellyBeanInstance()
    {
      return new JellyBean(); 
    }
  }
  </code></pre>
  
  <p>I need a JellyBean.</p>