As per this question, it seems that you can declare something like the following and have it "work":
@Configurable(autowire=Autowire.BY_TYPE)
public class Target {
private List<Dependency> dependencies;
public List<Dependency> getDependencies() {
return this.dependencies;
}
@Autowired
public void setDependencies(List<Dependency> dependencies) {
this.dependencies = dependencies;
}
}
Application context:
<beans>
<!-- where all extend Dependency -->
<bean class="com.dependencies.SubDependency"/>
<bean class="com.dependencies.SubSubDependency"/>
</beans>
According to the manual, this should "just work™", but it doesn't. Other dependenices are wired on Target
but the list dependency isn't. Is there something I'm doing wrong? I only have one dependency at the moment to be wired, but this will expand with time.