title: How to inject dependencies into a self-instantiated object in Spring?
body: <p>Let's say we have a class:</p>
  
  <pre><code>public class MyClass {
      @Autowired private AnotherBean anotherBean;
  }
  </code></pre>
  
  <p>Then we created an object of this class (or some other framework have created the instance of this class).</p>
  
  <pre><code>MyClass obj = new MyClass();
  </code></pre>
  
  <p>Is it possible to still inject the dependencies? Something like:</p>
  
  <pre><code>applicationContext.injectDependencies(obj);
  </code></pre>
  
  <p>(I think Google Guice has something like this)</p>