title: How to manually create a class instance with Spring
body: <p>I am using Spring Framework for Dependency Injection. At one point I inject an instance of a certain class into another class and I need to create an additional temporary object of the same class. I probably could change the scope of the injected bean to prototype but I wonder if there's another simple way to do that? </p>
  
  <p>My only idea is to create it using <code>new</code> but wanted to know if there is a proper way to do it with Spring.</p>
  
  <p>Just a general example:</p>
  
  <pre><code>@Inject
  private ClassA classA;
  
  public void methodA() {
  
  // here I need another instance of ClassA to be used in the scope of this method
  
  }
  </code></pre>