title: Spring 3 @Component and static factory method
body: <p>If I'm writing a static factory method to create objects, how do I use the '@Component' annotation for that factory class and indicate (with some annotation) the static factory method which should be called to create beans of that class? Following is the pseudo-code of what I mean:</p>
  
  <pre><code>@Component
  class MyStaticFactory
  {
      @&lt;some-annotation&gt;
      public static MyObject getObject()
      {
          // code to create/return the instance
      }
  }
  </code></pre>