title: annotation based factory methods
body: <p>I want to be able to autowire a singleton bean (<code>foo</code>) </p>
  
  <pre><code>@Component
  public class FooUser {
  
    @Autowire Foo foo;
  }
  </code></pre>
  
  <p>created by another singleton's method (<code>FooFactory.createFoo</code>)</p>
  
  <pre><code>@Service
  public class FooFactory {
  
    public Foo createFoo() {...}
  }
  </code></pre>
  
  <p>with xml it's simply <code>factory-method</code>. How can i do it with annotation?</p>