title: Create a new instance of component in Spring Boot/Framework
body: <p>In my Spring Boot based application I’ve a @Component class that has code similar to this:</p>
  
  <pre><code>ExecutorService executorService = Executors.newFixedThreadPool(poolSize);
  
  // Start a separate thread for each entry
  Map&lt;Long, Future&lt;Integer&gt;&gt; calls = new HashMap&lt;&gt;();
  
  for (MyClass info : list) {
      Callable&lt;Integer&gt; callable = new TableProcessor(info);
      Future&lt;Integer&gt; future = executorService.submit(callable);
      calls.put(info.getId(), future);
  }
  </code></pre>
  
  <p>The AutoWiring is not working in the TableProcessor class because (I think) I am creating an instance using ‘new’.  What’s the best way to ‘create a new instance for each entry in my list’?</p>
  
  <p>Note: Adding a ‘Bean’ to Application class won’t work in this case because I want a new instance for each thread.</p>