> For the complete documentation index, see [llms.txt](https://bernardo.gitbook.io/development-docs-java/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bernardo.gitbook.io/development-docs-java/spring-dependence-injection/injecting-multiple-instances.md).

# Injecting Multiple Instances

It is possible to inject all the instances of an interface or class:

```java
@Autowired(required = false)
public final void setInterceptors(final List<InterceptorBean> inters)
{
   interceptors = inters;
}
```

Generics will be taken into account. Meaning that InterceptorBean\<TypeA> is not the same as InterceptorBean\<TypeB>.
