title: Spring inject an object created using an instance called from a static method
body: <p>I have an object created as follows:</p>
  
  <pre><code> serviceValidatorObject = ServiceFactory.getInstance().getServiceValidator()
  </code></pre>
  
  <p>The object is created from a call to static method, <code>getInstance()</code>, then an instance method, <code>getServiceValidator()</code>.</p>
  
  <p>I want to use Spring injection to configure this instead.</p>
  
  <p>The trouble is the ServiceFactory is legacy code that I cannot change.</p>
  
  <p>I know Spring supports injection through a factory class static or instance method, but is there anyway I can configure the object creation above in Spring?</p>