Injecting Multiple Instances

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

@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>.

Last updated