I have a base class `Foo` and multiple classes that inherit from it.

Until now I've needed exactly one of each

So I just did:

```
@Autowired 
private List<Foo> foos;

```

But things has changed and I'd like to generate multiple objects of every type (i.e. `x` instances for `Foo1`, `y` instances for `Foo2` etc)

How can I do that using Spring Boot?

Note: I don't really need it to be populated into the list.

**EDIT:** 

I'll explain further about the problem I'm facing. Each class represents a type of task (It's a `Runnable`). Each task has a fixed number of threads. I'd like to instantiate a new object for every thread.

So my question is: How to utilise Spring for that cause? Back when I needed only one instance for every task it was easy (see the `List<Foo>` example)